getFileSystemManager
Requires:
BaseKit≥2.2.3@ray-js/ray≥0.3.23
Platforms:
iOSAndroid
Method signature
getFileSystemManager(params: )Minimum SDK versions
- iOS
ThingSmartBaseKitBizBundle - ≥ 5.2.1
- Android
com.thingclips.smart:thingsmart-bizbundle-basekit - ≥ 5.2.0
Description
Get the file manager; only files within the App can be operated on. If file operations require permission, call the permission API to request it
Parameters
| Property | Type | Required | Description |
|---|---|---|---|
complete | () => void | No | Completion callback (executed on both success and failure) |
success | () => void | No | Callback on successful API call |
fail | (params: Object) => void | No | Failure callback |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
Type: FileSystemManager
FileSystemManager
| Property | Type | Description | BaseKit Since | Minimum SDK versions |
|---|---|---|---|---|
access | function | Check whether a file/directory exists | v2.4.3 | — |
readFile | function | Read local file content | v2.0.1 | — |
readFileSync | function | Read local file content | v2.0.1 | — |
saveFile | function | Save a copy of the file to the destination path. | v2.4.3 | — |
saveFileSync | function | Save a copy of the file to the destination path. | - | — |
stat | function | Get the file Stats object; requires file read/write permissions. | v2.4.3 | — |
statSync | function | Get the file Stats object; requires file read/write permissions. | v2.4.3 | — |
mkdir | function | Create a directory; requires file read/write permissions. | v2.4.3 | — |
mkdirSync | function | Create a directory; requires file read/write permissions. | v2.4.3 | — |
rmdir | function | Delete a directory; requires file read/write permissions. | v2.4.3 | — |
rmdirSync | function | Delete a directory; requires file read/write permissions. | v2.4.3 | — |
writeFile | function | Write a file; requires file read/write permissions. | v2.4.3 | — |
writeFileSync | function | Write a file; requires file read/write permissions. | v2.4.3 | — |
removeSavedFile | function | Delete a saved local cache file; requires file read/write permissions. | v2.4.3 | — |