Filesystem Access
The File System Access API allows read, write and file management capabilities.
fs Method
async fs(method, path, ...args) {
// return Promise<any>
}// CREATE NEW DIRECTORY
await namespaceWrapper.fs("mkdir", `uploads`, {
recursive: true,
});
// COPY FILE
await namespaceWrapper.fs(
"copyFile",
`uploads/handler.js`,
`utils/handler.js`
);
// CREATE NEW FILE
await namespaceWrapper.fs(
"writeFile",
`uploads/handler.js`
);fsStaking Method
fsWriteStream Method
fsReadStream Method
Last updated