NovaOS
GithubHomeLaunchNeed help?
  • Welcome to NovaOSđź‘‹
  • Get started
    • Access NovaOS
  • How to
    • NovaOS How To
      • Setting a custom wallpaper
      • Changing default openers
      • Using default apps
        • Nova Files App
      • Data recovery
      • Using the Tasks Dock
    • Publish to Nova Store
    • Protips
    • Feedback and suggest
    • Support NovaOS
  • docs
    • Basics
      • Introduction
      • Timing
      • File system
        • Overview on files
        • File management
      • User choices
        • Settings Keys
        • Choose files
      • Managing self
        • The Open Launch Protocol
        • The EventBusWorker
    • Standards
      • Styling standards
      • Error standards
    • Networking
      • Rotur In NovaOS
    • Features
  • References
    • The NovaOS Check list
    • Methods
      • Database management
      • File management
    • NTX Actions
    • Projects
  • Epic
    • Achievements
Powered by GitBook
On this page
  • getFileNamesByFolder(folderpath)
  • getFileByPath(path)
  • getFileById(id, datatype)
  • createFile()

Was this helpful?

  1. References
  2. Methods

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.

createFile()

PreviousDatabase managementNextNTX Actions

Last updated 22 days ago

Was this helpful?