Cordova FileEntry equivalent for Node.js
[heading: "Description"]NodeFileEntry wraps a single file on disk behind the same interface that Cordova FileEntry exposes. It supports reading file metadata, creating a writer for output, and resolving a file descriptor so that higher-level code can operate uniformly across platforms.
[heading: "Key Features"] [list] * Mimics the Cordova FileEntry API for NW.js environments * Provides createWriter and file callbacks compatible with Cordova patterns * Detects MIME types from file extensions [/list] [heading: "Constructor"] [table header] [ Parameter | Type | Description ] [ name | string | The file name ] [ fullPath | string | The relative path from the filesystem root ] [ fileSystem | NodeFileSystem | The parent NodeFileSystem instance ] [ nativeURL | string | The native file:// URL for this file ] [/table] [heading: "Example Usage (Modding)"] [codeblock javascript] // Reading a file via NodeFileEntry const fs = new NodeFileSystem(); const dir = await fs.getDirectory('Songs/MySong/'); const reader = dir.createReader(); reader.readEntries((entries) => { const fileEntry = entries.find(e => e.isFile && e.name === 'song.sm'); fileEntry.file((file) => { console.log('File size:', file.size, 'Type:', file.type); }, (err) => console.error(err)); }, (err) => console.error(err)); [/codeblock] [footer: "© Retora 2026"]