msilib.Directory

class msilib.Directory(database, cab, basedir, physical, logical, default[, componentflags])

Create a new directory in the Directory table. There is a current component at each point in time for the directory, which is either explicitly created through start_component(), or implicitly when files are added for the first time. Files are added into the current component, and into the cab file. To create a directory, a base directory object needs to be specified (can be None), the path to the physical directory, and a logical directory name. default specifies the DefaultDir slot in the directory table. componentflags specifies the default flags that new components get.

start_component(component=None, feature=None, flags=None, keyfile=None, uuid=None)

Add an entry to the Component table, and make this component the current component for this directory. If no component name is given, the directory name is used. If no feature is given, the current feature is used. If no flags are given, the directory’s default flags are used. If no keyfile is given, the KeyPath is left null in the Component table.

add_file(file, src=None, version=None, language=None)

Add a file to the current component of the directory, starting a new one if there is no current component. By default, the file name in the source and the file table will be identical. If the src file is specified, it is interpreted relative to the current directory. Optionally, a version and a language can be specified for the entry in the File table.

glob(pattern, exclude=None)

Add a list of files to the current component as specified in the glob pattern. Individual files can be excluded in the exclude list.

remove_pyc()

Remove .pyc/.pyo files on uninstall.

doc_python
2016-10-07 17:37:24
Comments
Leave a Comment

Please login to continue.