Skip to content

$fn.putFile(path, parameters)

Saves the file to the specified path. "asynchronous"

Arguments

NameTypeDescription
pathstringPath of the file to save
parametersobjectdata: Buffer | Unit8Array | Objects with string as a property

Return value

None

Sample

try {
const obj = await $fn.getFile("/note.dat");
await $fn.putFile('filePath', obj);
} catch (err) {
console.log("Error", err);
}