Classes
Methods
close()
Close the importer and associated resources
- Source:
getWorkerPath()
Get the current worker script path
- Source:
Returns:
The path
(async) importFile(fileToImport, dir, deleteSource, integrity, onProgress) → {Promise.<(IVirtualFile|null)>}
Imports a real file into the drive.
Parameters:
Name | Type | Description |
---|---|---|
fileToImport |
IRealFile | The source file that will be imported in to the drive. |
dir |
IRealFile | The target directory in the drive that the file will be imported |
deleteSource |
boolean | If true delete the source file. |
integrity |
boolean | Apply data integrity |
onProgress |
onProgress | null | Progress to notify |
- Source:
Returns:
A promise which resolves to a virtual file or null
- Type
- Promise.<(IVirtualFile|null)>
initialize(bufferSize, threads)
Constructs a file importer that can be used to import files to the drive
Parameters:
Name | Type | Description |
---|---|---|
bufferSize |
Buffer size to be used when encrypting files. If using integrity this value has to be a multiple of the Chunk size. If not using integrity it should be a multiple of the AES block size for better performance | |
threads |
The threads |
- Source:
isRunning()
True if importer is currently running a job.
- Source:
Returns:
True if running
setWorkerPath(path)
Set the path to the worker script to use
Parameters:
Name | Type | Description |
---|---|---|
path |
The path |
- Source:
stop()
Stops all current importing tasks
- Source: