/** * @file Thin facade returned by {@link TinyFSCore#open}. */ /** * Handle returned by `open()`, shaped like `node:fs/promises.FileHandle`. * * The handle is a facade over the originating {@link TinyFSCore} instance. * Every method delegates back to the file system, so no file descriptor is * actually held open. */ export declare class FileHandle { #private; /** * @param {import('./index.mjs').default} fs Originating file system. * @param {string} path Absolute path of the opened file. * @param {string} flags Access mode the handle was opened with. */ constructor(fs: import('./index.mjs').default, path: string, flags: string); /** @returns {string} Absolute path of the opened file. */ get path(): string; /** @returns {string} Access mode the handle was opened with. */ get flags(): string; /** @returns {boolean} `true` once `close()` has been awaited. */ get closed(): boolean; /** * @param {import('./index.mjs').TReadFileOptions} [options] Read options. * @returns {Promise} The file contents. */ readFile(options?: import('./index.mjs').TReadFileOptions): Promise; /** * @param {string | Uint8Array | ArrayBuffer} data Payload to persist. * @param {import('./index.mjs').TWriteFileOptions} [options] Write options. * @returns {Promise} Resolves once the payload is committed. */ writeFile(data: string | Uint8Array | ArrayBuffer, options?: import('./index.mjs').TWriteFileOptions): Promise; /** * @param {string | Uint8Array | ArrayBuffer} data Payload to append. * @param {import('./index.mjs').TWriteFileOptions} [options] Write options. * @returns {Promise} Resolves once the payload is committed. */ appendFile(data: string | Uint8Array | ArrayBuffer, options?: import('./index.mjs').TWriteFileOptions): Promise; /** * @returns {Promise} A fresh snapshot of the file metadata. */ stat(): Promise; /** * @param {number} [length] Target length in bytes. * @returns {Promise} Resolves once the file is truncated. */ truncate(length?: number): Promise; /** * @returns {Promise} Resolves once the handle is released. */ close(): Promise; } //# sourceMappingURL=handle.d.mts.map