The FileManager object is used to perform operation on local and/or remote files.
- Source:
Methods
-
copy(sourceUrl, targetUrl, callback) → {external:FileTransfer}
-
Create a FileTransfer object to handle the copy of a file.
Parameters:
Name Type Description sourceUrl
string The URL of the file to copy targetUrl
string The URL where to copy the file callback
object The javascript function to be called when the operation is finished or on error. This function will receive a boolean value telling whether the operation has been successful as its first argument. If the operation failed, it will receive an error string as its second parameter. - Source:
Returns:
The FileTransfer object to handle the copy. -
exists(url, callback)
-
Test the existence of a file.
Parameters:
Name Type Description url
string The URL of the file to check callback
object The javascript function to be called when the operation is finished or on error. This function will receive a boolean value telling whether the file exists as its first argument. If there was an error, it will receive an error string as its second parameter. - Source:
-
mkdir(url, callback)
-
Create a directory.
Parameters:
Name Type Description url
string The URL of the directory to create callback
object The javascript function to be called when the operation is finished or on error. This function will receive a boolean value telling whether the directory has been created as its first argument. If there was an error, it will receive an error string as its second parameter. - Source:
-
remove(url, callback)
-
Remove a file or a directory.
Parameters:
Name Type Description url
string The URL of the file or directory to remove callback
object The javascript function to be called when the operation is finished or on error. This function will receive a boolean value telling whether the file or directory has been removed as its first argument. If there was an error, it will receive an error string as its second parameter. - Source: