FileManifest¶
- class starlark_tugger.FileManifest¶
The
FileManifesttype represents a set of files and their content.FileManifestinstances are used to represent things like the final filesystem layout of an installed application.Conceptually, a
FileManifestis a dict mapping relative paths to file content.- add_manifest(manifest: FileManifest)¶
This method overlays another :py:class`FileManifest` on this one. If the other manifest provides a path already in this manifest, its content will be replaced by what is in the other manifest.
- add_path(path: str, strip_prefix: str, force_read: bool = False)¶
This method adds a file on the filesystem to the manifest.
The following arguments are accepted:
pathThe filesystem path to add.
strip_prefixThe string prefix to strip from the path. The remaining path will be stored in the manifest.
force_readWhether to read the file data into memory now.
This can be set when reading temporary files.
- install(path: str, replace: bool = True)¶
This method writes the content of the
FileManifestto a directory specified bypath. The path is evaluated relative to the path specified byBUILD_PATH.If
replaceis True (the default), the destination directory will be deleted and the final state of the destination directory should exactly match the state of theFileManifest.Upon successful materialization of all files in the manifest, all written files will be assessed for code signing with the
file-manifest-installaction.