Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
msilib.CAB Class Reference

List of all members.

Public Member Functions

def __init__
def gen_id
def append
def commit
def __init__
def gen_id
def append
def commit

Public Attributes

 name
 files
 filenames
 index

Detailed Description

Definition at line 185 of file __init__.py.


Constructor & Destructor Documentation

def msilib.CAB.__init__ (   self,
  name 
)

Definition at line 186 of file __init__.py.

00186 
00187     def __init__(self, name):
00188         self.name = name
00189         self.files = []
00190         self.filenames = set()
00191         self.index = 0

Here is the caller graph for this function:

def msilib.CAB.__init__ (   self,
  name 
)

Definition at line 351 of file msilib.py.

00351 
00352     def __init__(self, name):
00353         self.name = name
00354         self.files = []
00355         self.filenames = sets.Set()
00356         self.index = 0

Here is the call graph for this function:

Here is the caller graph for this function:


Member Function Documentation

def msilib.CAB.append (   self,
  full,
  file,
  logical 
)

Definition at line 201 of file __init__.py.

00201 
00202     def append(self, full, file, logical):
00203         if os.path.isdir(full):
00204             return
00205         if not logical:
00206             logical = self.gen_id(file)
00207         self.index += 1
00208         self.files.append((full, logical))
00209         return self.index, logical

Here is the call graph for this function:

Here is the caller graph for this function:

def msilib.CAB.append (   self,
  full,
  file,
  logical = None 
)

Definition at line 366 of file msilib.py.

00366 
00367     def append(self, full, file, logical = None):
00368         if os.path.isdir(full):
00369             return
00370         if not logical:
00371             logical = self.gen_id(dir, file)
00372         self.index += 1
00373         self.files.append((full, logical))
00374         return self.index, logical

Here is the call graph for this function:

Here is the caller graph for this function:

def msilib.CAB.commit (   self,
  db 
)

Definition at line 210 of file __init__.py.

00210 
00211     def commit(self, db):
00212         from tempfile import mktemp
00213         filename = mktemp()
00214         FCICreate(filename, self.files)
00215         add_data(db, "Media",
00216                 [(1, self.index, None, "#"+self.name, None, None)])
00217         add_stream(db, self.name, filename)
00218         os.unlink(filename)
00219         db.Commit()

Here is the call graph for this function:

Here is the caller graph for this function:

def msilib.CAB.commit (   self,
  db 
)

Definition at line 375 of file msilib.py.

00375 
00376     def commit(self, db):
00377         try:
00378             os.unlink(self.name+".cab")
00379         except OSError:
00380             pass
00381         _msi.FCICreate(self.name+".cab", self.files)
00382         add_data(db, "Media",
00383                 [(1, self.index, None, "#"+self.name, None, None)])
00384         add_stream(db, self.name, self.name+".cab")
00385         os.unlink(self.name+".cab")
00386         db.Commit()

Here is the call graph for this function:

def msilib.CAB.gen_id (   self,
  file 
)

Definition at line 192 of file __init__.py.

00192 
00193     def gen_id(self, file):
00194         logical = _logical = make_id(file)
00195         pos = 1
00196         while logical in self.filenames:
00197             logical = "%s.%d" % (_logical, pos)
00198             pos += 1
00199         self.filenames.add(logical)
00200         return logical

Here is the call graph for this function:

Here is the caller graph for this function:

def msilib.CAB.gen_id (   self,
  dir,
  file 
)

Definition at line 357 of file msilib.py.

00357 
00358     def gen_id(self, dir, file):
00359         logical = _logical = make_id(file)
00360         pos = 1
00361         while logical in self.filenames:
00362             logical = "%s.%d" % (_logical, pos)
00363             pos += 1
00364         self.filenames.add(logical)
00365         return logical

Here is the call graph for this function:


Member Data Documentation

Definition at line 189 of file __init__.py.

Definition at line 188 of file __init__.py.

Definition at line 190 of file __init__.py.

Definition at line 187 of file __init__.py.


The documentation for this class was generated from the following files: