@rimaulana/asustor-node
v1.0.0
Published
node module to get information on ASUSTOR NAS storage
Downloads
12
Readme
ASUSTOR Node
A node module to get files and removable storage information from ASUSTOR NAS running on Ubuntu OS
Installation
npm install @rimaulana/asustor-node
Example
Getting attached USB drives information :
var asustor = require("@rimaulana/asustor-node");
// Asynchronous
asustor.usbInfo(function(error, data) {
if (error) {
console.log(error);
} else {
console.log(data);
}
});
// Synchronous
console.log(asustor.usbInfoSync());
Getting File information :
var asustor = require("@rimaulana/asustor-node");
var file_path = "/home/user/file.mkv";
// Asynchronous
asustor.fileInfo(file_path, function(error, data) {
if (error) {
console.log(error);
} else {
console.log(data);
}
});
// Synchronous
console.log(asustor.fileInfoSync(file_path));
Getting Folder information :
var asustor = require("@rimaulana/asustor-node");
var folder_path = "/home/user";
// Asynchronous
asustor.folderInfo(folder_path, function(error, data) {
if (error) {
console.log(error);
} else {
console.log(data);
}
});
// Synchronous
console.log(asustor.folderInfoSync(folder_path));
Tests
npm test