Skip to content

Latest commit

 

History

History
33 lines (27 loc) · 1007 Bytes

TEMPLATE.md

File metadata and controls

33 lines (27 loc) · 1007 Bytes

teamspeak-filesystem npm version

Wrapper built around teamspeak-query to interface with the teamspeak filesystem.

Installation

$ npm install teamspeak-filesystem

Example

const fs = require('fs');

const TeamspeakQuery = require('teamspeak-query');
const TeamspeakFS = require('teamspeak-filesystem');

const query = new TeamspeakQuery();
const tsfs = TeamspeakFS(query); // Requires an instance of teamspeak-query

query.send('login', 'username', 'password')
    .then(() => query.send('use', 1))
    .then(() => tsfs.upload(1, '/filename', 'Hello World!\n'))
    .then(() => tsfs.download(1, '/filename'))
    .then(data => data.pipe(fs.createWriteStream('./hello'))
    .catch(console.error)

API Reference

{{#module name="TeamspeakFS"}} {{>body~}} {{>member-index~}} {{>separator~}} {{>members~}} {{/module}}