|
Salmon
|
Facade class for file operations. More...
Classes | |
| class | FileTaskProgress |
| File task progress. More... | |
| class | IVirtualFileTaskProgress |
| Task progress for encrypted file operations. More... | |
| class | RealFileTaskProgress |
| Task progress for real file operations. More... | |
Public Member Functions | |
| FileCommander (FileImporter fileImporter, FileExporter fileExporter, FileSearcher fileSearcher) | |
| Instantiate a new file commander object. | |
| virtual IVirtualFile[] | ImportFiles (IRealFile[] filesToImport, IVirtualFile importDir, bool deleteSource, bool integrity, Action< RealFileTaskProgress > OnProgressChanged, Func< IRealFile, string > AutoRename, Action< IRealFile, Exception > OnFailed) |
| Import files to the drive. | |
| IRealFile[] | ExportFiles (IVirtualFile[] filesToExport, IRealFile exportDir, bool deleteSource, bool integrity, Action< IVirtualFileTaskProgress > OnProgressChanged, Func< IRealFile, string > AutoRename, Action< IVirtualFile, Exception > OnFailed) |
| Export a file from a drive. | |
| void | DeleteFiles (IVirtualFile[] filesToDelete, Action< IVirtualFileTaskProgress > OnProgressChanged, Action< IVirtualFile, Exception > OnFailed) |
| Delete files. | |
| void | CopyFiles (IVirtualFile[] filesToCopy, IVirtualFile dir, bool move, Action< IVirtualFileTaskProgress > OnProgressChanged, Func< IVirtualFile, string > AutoRename, bool autoRenameFolders, Action< IVirtualFile, Exception > OnFailed) |
| Copy files to another directory. | |
| void | Cancel () |
| Cancel all jobs. | |
| bool | IsFileSearcherRunning () |
| True if the file search is currently running. | |
| bool | IsRunning () |
| True if jobs are currently running. | |
| bool | IsFileSearcherStopped () |
| True if file search stopped. | |
| void | StopFileSearch () |
| Stop file search. | |
| IVirtualFile[] | Search (IVirtualFile dir, string terms, bool any, FileSearcher.OnResultFoundListener OnResultFound, Action< FileSearcher.SearchEvent > OnSearchEvent) |
| Search. | |
| bool | AreJobsStopped () |
| True if all jobs are stopped. | |
| void | Close () |
| Close the file commander and associated resources. | |
| void | RenameFile (IVirtualFile file, string newFilename) |
| Rename an encrypted file. | |
Facade class for file operations.
| bool Mku.Utils.FileCommander.AreJobsStopped | ( | ) |
True if all jobs are stopped.
| void Mku.Utils.FileCommander.CopyFiles | ( | IVirtualFile[] | filesToCopy, |
| IVirtualFile | dir, | ||
| bool | move, | ||
| Action< IVirtualFileTaskProgress > | OnProgressChanged, | ||
| Func< IVirtualFile, string > | AutoRename, | ||
| bool | autoRenameFolders, | ||
| Action< IVirtualFile, Exception > | OnFailed ) |
Copy files to another directory.
| filesToCopy | The array of files to copy. |
| dir | The target directory. |
| move | True if moving files instead of copying. |
| OnProgressChanged | The progress change observer to notify. |
| AutoRename | The auto rename function to use when files with same filename are found. |
| autoRenameFolders | Apply autorename to folders also (default is true) |
| OnFailed | The observer to notify when failures occur. |
| Exception | Thrown if error during operation |
| void Mku.Utils.FileCommander.DeleteFiles | ( | IVirtualFile[] | filesToDelete, |
| Action< IVirtualFileTaskProgress > | OnProgressChanged, | ||
| Action< IVirtualFile, Exception > | OnFailed ) |
Delete files.
| filesToDelete | The array of files to delete. |
| OnProgressChanged | The progress change observer to notify. |
| OnFailed | The observer to notify when failures occur. |
| Exception | Thrown if error during operation |
| IRealFile[] Mku.Utils.FileCommander.ExportFiles | ( | IVirtualFile[] | filesToExport, |
| IRealFile | exportDir, | ||
| bool | deleteSource, | ||
| bool | integrity, | ||
| Action< IVirtualFileTaskProgress > | OnProgressChanged, | ||
| Func< IRealFile, string > | AutoRename, | ||
| Action< IVirtualFile, Exception > | OnFailed ) |
Export a file from a drive.
| filesToExport | The files to export. |
| exportDir | The export target directory. |
| deleteSource | True if you want to delete the source files. |
| integrity | True to use integrity verification before exporting files |
| OnProgressChanged | Observer to notify when progress changes. |
| AutoRename | Function to rename file if another file with the same filename exists. |
| OnFailed | Observer to notify when a file fails exporting. |
| Exception | Thrown if error during operation |
|
virtual |
Import files to the drive.
| filesToImport | The files to import. |
| importDir | The target directory. |
| deleteSource | True if you want to delete the source files. |
| integrity | True to apply integrity to imported files |
| OnProgressChanged | Observer to notify when progress changes. |
| AutoRename | Function to rename file if another file with the same filename exists. |
| OnFailed | Observer to notify when a file fails importing. |
| Exception | Thrown if error during operation |
Reimplemented in Mku.Salmon.Utils.SalmonFileCommander.
| bool Mku.Utils.FileCommander.IsFileSearcherRunning | ( | ) |
True if the file search is currently running.
| bool Mku.Utils.FileCommander.IsFileSearcherStopped | ( | ) |
True if file search stopped.
| bool Mku.Utils.FileCommander.IsRunning | ( | ) |
True if jobs are currently running.
| void Mku.Utils.FileCommander.RenameFile | ( | IVirtualFile | file, |
| string | newFilename ) |
Rename an encrypted file.
| file | The file |
| newFilename | The new file name |
| IVirtualFile[] Mku.Utils.FileCommander.Search | ( | IVirtualFile | dir, |
| string | terms, | ||
| bool | any, | ||
| FileSearcher.OnResultFoundListener | OnResultFound, | ||
| Action< FileSearcher.SearchEvent > | OnSearchEvent ) |
Search.
| dir | The directory to start the search. |
| terms | The terms to search for. |
| any | True if you want to match any term otherwise match all terms. |
| OnResultFound | Callback interface to receive notifications when results found. |
| OnSearchEvent | Callback interface to receive status events. |