FileSystemManager.getFileInfo(Object object)
Gets the information of local temporary files or local cache files under the Mini Program.
Parameters
Object object
Attribute | Type | Default | Required | Description |
filePath | string | | Yes | Path to the files to be read |
success | function | | No | The callback function for a successful API call |
fail | function | | No | Callback function for failed API call |
complete | function | | No | Callback function used when API call completed (always executed whether call succeeds or fails) |
object.success callback function
Parameters
Object res
Property | Type | Description |
size | number | File size in bytes |
object.fail callback function
Parameters
Object res
Property | Type | Description |
errMsg | string | Error message |
Valid values of res.errMsg
Value | Description | Minimum Version |
fail file not exist | No file found with the specified filePath | |