File management

getFileNamesByFolder(folderpath)

A function to return an array of file names along with their ID's in a folder, using the folder's path.

Example:

await fileList = getFileNamesByFolder("Apps/Subfolder/");
await fileItem = getFileById(fileList[0].id);
console.log("File content: " + fileItem.content)

We recommend using a try ... catch () block around code that deals with file management.

getFileByPath(path)

Returns an object with file name, metadata, ID and type.

getFileById(id, datatype)

Returns an object with file name, metadata, ID, type, path and content.

Last updated