Tutorial: Work with Samba servers

Work with Samba servers

Start scanning to find all available SMB groups:

stbSmb.findGroups(function ( error, data ) {
    if ( error ) {
        throw new Error(error);
    }

    console.log('list of found groups:', data);
});

Start group scanning to find all available servers:

stbSmb.findServers(groupName, function ( error, data ) {
    if ( error ) {
        throw new Error(error);
    }

    console.log('list of found servers:', data);
});

Start scanning to find all available exports on the given server:

stbSmb.findShares(groupName, server, function ( error, data ) {
    if ( error ) {
        throw new Error(error);
    }

    console.log('list of found shares:', data);
});

Resolve IP for the given export name in the specific SMB group:

stbSmb.findIp(groupName, server, function ( error, data ) {
     if ( error ) {
        throw new Error(error);
    }

    console.log('resolved server IP:', data);
});