Since you did not specify the target operating system, you can use this command under Windows:
fsutil fsinfo volumeinfo <disk letter here>:
to show simillar output to this:
H:\>fsutil fsinfo volumeinfo c:
Volume Name :
Volume Serial Number : 0x4c31bcb3
Max Component Length : 255
File System Name : NTFS
Supports Case-sensitive filenames
Preserves Case of filenames
Supports Unicode in filenames
Preserves & Enforces ACL's
Supports file-based Compression
Supports Disk Quotas
Supports Sparse files
Supports Reparse Points
Supports Object Identifiers
Supports Encrypted File System
Supports Named Streams
You only need to parse the output of the command correctly. I would recommend that you store the file system names in an array and search for each command in the output, excluding the first line. This way you can be sure which file system is being used by the target machine.
, :
const { exec } = require('child_process');
exec('fsutil fsinfo volumeinfo c:', (err, stdout, stderr) => {
if (err) {
return;
}
console.log(`stdout: ${stdout}`);
});
, , . , , .
, ?