The CompanionManager manages the files within the companion directory.
When reading a document, it resolves filenames from those stored in the document into absolute paths of existing files, and it copies files from the companion directory to the working directory.
When writing a document, it resolves filenames from absolute paths into relative paths, and it copies files from the working directory to the companion directory and removes unreferenced files.
#include
<class_companion_manager_1_1_companion_manager.h>
Classes |
|
class | copyThread |
Public Member Functions |
|
__init__ () | |
setCopyOnRead () | |
isCopyOnRead () | |
init () | |
Initialize for a read or write operation.
|
|
getFilenames () | |
getCompanionDir () | |
setDestinationFilename () | |
Set the final filename to be used for the
given filename when the file is copied from the original directory
to the Destination directory. |
|
setWorkingDirectoryFilename () | |
Set the final filename to be used for the
given filename when the file is copied from the companion directory
to the working directory. |
|
setKeptFilename () | |
Don't delete these files after saving.
|
|
readResolveFilename () | |
Resolve a filename that was read from a
document into an absolute path of an existing file. |
|
postRead () | |
Copy files from the companion directory into
the working directory. |
|
writeResolveFilename () | |
Resolve a filename that will be written to a
document from an absolute path into a relative path. |
|
postWrite () | |
Copy files from the working directory into
the companion directory. |
|
Public Attributes |
|
myKeepAllTextures | |
myForceCopy | |
myNeverCopy |
CompanionManager.CompanionManager.__init__ | ( | ) |
CompanionManager.CompanionManager.setCopyOnRead | ( | ) |
CompanionManager.CompanionManager.isCopyOnRead | ( | ) |
CompanionManager.CompanionManager.init | ( | ) |
Initialize for a read or write operation.
This method should be called once per document read/write, and before readResolveFilename() or writeResolveFilename() are called.
CompanionManager.CompanionManager.getFilenames | ( | ) |
CompanionManager.CompanionManager.getCompanionDir | ( | ) |
CompanionManager.CompanionManager.setDestinationFilename | ( | ) |
Set the final filename to be used for the given filename when the file is copied from the original directory to the Destination directory.
CompanionManager.CompanionManager.setWorkingDirectoryFilename | ( | ) |
Set the final filename to be used for the given filename when the file is copied from the companion directory to the working directory.
This final filename will also be returned if the original filename is given as the argument to readResolveFilename().
CompanionManager.CompanionManager.setKeptFilename | ( | ) |
Don't delete these files after saving.
CompanionManager.CompanionManager.readResolveFilename | ( | ) |
Resolve a filename that was read from a document into an absolute path of an existing file.
Returns a tuple containing a string representing the resolved path, and a boolean set to True if the path was resolved to the companion directory.
CompanionManager.CompanionManager.postRead | ( | ) |
Copy files from the companion directory into the working directory.
CompanionManager.CompanionManager.writeResolveFilename | ( | ) |
Resolve a filename that will be written to a document from an absolute path into a relative path.
Returns a tuple containing a string representing the relative path, and a boolean set to True if the path was made relative to the companion directory.
CompanionManager.CompanionManager.postWrite | ( | ) |
Copy files from the working directory into the companion directory.
Cleanup any unreferenced files from the companion directory.