- Tutorials:
Global object to browse NFS servers.
Exists only on supported devices.
Methods
(static) findServers(callback)
Start scanning to find all available servers.
Example
stbNfs.findServers(function ( error, data ) {
if ( !error ) {
// list of found servers:
// ['192.168.0.8']
console.log(data);
}
});
Parameters:
Name | Type | Description |
---|---|---|
callback |
stbNfs~findServersCallback | scan result handler |
Throws:
Will throw an error in case of bad input arguments.
(static) findShares(ip, callback)
Start scanning to find all available exports on the given server.
A server IP can be obtained with stbNfs.findServers
.
Example
stbNfs.findShares('192.168.0.8', function ( error, data ) {
if ( !error ) {
// list of found shares:
// ['video', 'music']
console.log(data);
}
});
Parameters:
Name | Type | Description |
---|---|---|
ip |
string | server IP address to scan |
callback |
stbNfs~findSharesCallback | scan result handler |
Throws:
Will throw an error in case of bad input arguments.
Type Definitions
findServersCallback(error, data)
Servers scan result handler.
Parameters:
Name | Type | Description |
---|---|---|
error |
string | null | scan error message on failure |
data |
Array.<string> | found server list |
findSharesCallback(error, data)
Shares scan result handler.
Parameters:
Name | Type | Description |
---|---|---|
error |
string | null | scan error message on failure |
data |
Array.<string> | export directory name list |