Skip to main content
Get file size and digest information.

Parameters

PropertyTypeRequiredDescription
apFilePathStringYesFile path
digestAlgorithmStringNoHash algorithm: md5 or sha1
successFunctionNoCallback with file info
failFunctionNoCallback on failure
completeFunctionNoCallback that always executes

Success Callback

PropertyTypeDescription
sizeNumberFile size in bytes
digestStringFile hash digest

Code Example

my.getFileInfo({
  apFilePath: filePath,
  digestAlgorithm: 'md5',
  success: (res) => {
    console.log('Size:', res.size);
    console.log('MD5:', res.digest);
  }
});