@trap_stevo/filenet
Version:
Provides the groundbreaking solution for real-time, OTA (Over-The-Air) file transfer, streamlining client-to-client sharing with unmatched efficiency and effortless, on-the-fly handling. Whether managing peer-to-peer or client-server transfers, FileNet en
39 lines (38 loc) • 1.31 kB
JavaScript
;
const FileTide = require("@trap_stevo/filetide");
class FileNet {
constructor() {
this.fileNetManager = new FileTide();
return;
}
launch(fileNetID, netOptions = {}, onLaunch, ...netConfigurations) {
this.fileNetManager.launchFileTide(netOptions, onLaunch, ...netConfigurations);
this.fileNetManager.currentUserID = fileNetID;
return;
}
async getDirectoryData(directoryPath) {
return await this.fileNetManager.getDirectoryData(directoryPath);
}
getFileData(filePath) {
return this.fileNetManager.getFileData(filePath);
}
async getPathData(inputPath) {
return await this.fileNetManager.getPathData(inputPath);
}
getTidePath(inputPath) {
return this.fileNetManager.getTidePath(inputPath);
}
async sendToDevice(userID, filePath, destinationPath, filterContent = [], tideSize = 200, tidalSize = 500, minTideSize = 10, maxTideSize = 2000, transferRequestExpirationTime = 30000) {
await this.fileNetManager.sendToDevice(userID, filePath, destinationPath, filterContent, tideSize, tidalSize, minTideSize, maxTideSize, transferRequestExpirationTime);
return;
}
operational() {
return this.fileNetManager.fileTideOperational();
}
close() {
this.fileNetManager.stopFileTide();
return;
}
}
;
module.exports = FileNet;