Skip to content

getVolumeInformation and getVolumeInformationSync

xiao edited this page Sep 29, 2021 · 5 revisions

get information of the specific volume.

usage

async:

fswin.getVolumeInformation(path, callback);

sync:

var result = fswin.getVolumeInformationSync(path);
  • path is the root path of a volume.
  • callback is a function to make callback with. it takes only one argument result.
  • result is an Object when the path is accessible or undefined otherwise.

example

var fswin = require('fswin');
var path = 'c:\\';

//sync
console.log(fswin.getVolumeInformationSync(path));

//async
fswin.getVolumeInformation(path, console.log);