-
-
Notifications
You must be signed in to change notification settings - Fork 12
setVolumeLabel
xiao edited this page Nov 8, 2025
·
1 revision
change label for the specific volume.
callback:
fswin.setVolumeLabel(path, label, callback);async:
var result = await fswin.setVolumeLabelAsync(volume, label);sync:
var result = fswin.setVolumeLabelSync(volume, label);-
pathis the root path of a volume. -
labelis a string you want to label the volume. -
callbackis a function that takes only one argumentresult. -
resultis a boolean value to indicate whether the operation is succeeded.
var fswin = require('fswin');
var path = 'c:\\';
//sync
console.log(fswin.setVolumeLabelSync(path, 'test1'));
//async
fswin.setVolumeLabel(path, 'test2', console.log);