class
ProjectLibraryCopyOperation
Project library operation that copies a file or a folder to another location.
Note the operation cannot overwrite existing files, and will skip such files.
Public
Constructors
ProjectLibraryCopyOperation
Constructs the operation.
- context
- Project library context the operation is being executed in.
- sourceRelativePath
- Path of the file or folder to copy. Relative to the project library imported resources folder.
- destinationRelativePath
- Path to the location where to place the copied file or folder. Relative to the project library imported resources folder.
Methods
PrepareOnMainThread
Performs the first stage of the operation.
Verifies the input parameters are correct, creates library database entries (if possible) and returns success if operation will proceed to execute. Executed on the main thread.
Returns: Operation result and optional error message if failed.
RunOnWorkerThread
Performs the second stage of the operation.
Performs longer lasting tasks such as saving or loading a package, copying a file or generating preview icons. Executed on a worker thread.
FinalizeOnMainThread
Performs the last stage of the operation.
This will be called after the worker thread completes. Will ensure the entries in the project library database match to packages written by the worker thread.
Private
Methods
CopyPackage
Copies a single package associated with one or multiple resources at the provided path.
- sourceRelativePath
- Path to the imported package to copy. Relative to the project library imported resources folder.
- destinationRelativePath
- Path at which to place the copied package. Relative to the project library imported resources folder.
- resourcesInCopiedPackage
- Information about all resources that are part of the copied package.
- isSynchronizedPackage
- True if we're copying a package containing resources synchronized with a source resource (such package package may contain more than one resource).