[title: "NodeFileSystem Class"] ← Back to index

File system implementation for NW.js desktop applications using Node.js APIs.

[heading: "Description"]

NodeFileSystem provides full file system access for desktop applications using Node.js file system APIs. It offers complete read/write capabilities and directory management.

[heading: "Methods"] [table header] [ Method | Parameters | Description ] [ constructor | () | Initializes Node.js file system ] [ getBasePath | () | Gets application base path ] [ getDirectory | (path) | Gets directory entry ] [ listDirectories | (dirEntry) | Lists subdirectories ] [ listAllDirectories | (startDir) | Recursively lists directories ] [ listFiles | (dirEntry) | Lists files in directory ] [ getFile | (fileEntry) | Gets file entry ] [ readFileContent | (file) | Reads file content ] [ saveFile | (dirEntry, fileData, fileName) | Saves file to directory ] [ createEmptyFile | (dirEntry, fileName, isAppend) | Creates empty file ] [ writeFile | (fileEntry, dataObj, isAppend) | Writes data to file ] [ createDirectory | (rootDirEntry, dirName) | Creates new directory ] [/table] [heading: "Node.js Integration"] [table header] [ Module | Purpose | Methods Used ] [ fs | File operations | readFile, writeFile, stat, readdir, mkdir ] [ path | Path handling | join, basename, resolve ] [/table] [heading: "Base Path Detection"] [table header] [ Environment | Base Path | Description ] [ NW.js | nw.process.cwd() | Executable directory ] [ Node.js | process.cwd() | Current working directory ] [ Fallback | "." | Current directory ] [/table] [footer: "© Retora 2025"]