File
my.getFileInfo
Get information about a file.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Get information about a file.
| Property | Type | Required | Description |
|---|---|---|---|
| apFilePath | String | Yes | File path |
| digestAlgorithm | String | No | Hash algorithm: md5 or sha1, md5 by default |
| success | Function | No | Callback with file info |
| fail | Function | No | Callback on failure |
| complete | Function | No | Callback that always executes |
| Property | Type | Description |
|---|---|---|
| size | Number | File size in bytes |
| digest | String | File hash digest |
my.getFileInfo({
apFilePath: filePath,
digestAlgorithm: 'md5',
success: (res) => {
console.log('Size:', res.size);
console.log('MD5:', res.digest);
}
});