UNPKG

@codesandbox/sandpack-client

Version:

<img style="width:100%" src="https://user-images.githubusercontent.com/4838076/143581035-ebee5ba2-9cb1-4fe8-a05b-2f44bd69bb4b.gif" alt="Component toolkit for live running code editing experiences" />

56 lines (55 loc) 1.87 kB
/// <reference types="node" /> import { default as Stats } from '../core/node_fs_stats'; import { SynchronousFileSystem, FileSystem, BFSCallback, FileSystemOptions } from '../core/file_system'; import { File } from '../core/file'; import { FileFlag } from '../core/file_flag'; /** * Options for IsoFS file system instances. */ export interface IsoFSOptions { data: Buffer; name?: string; } /** * Mounts an ISO file as a read-only file system. * * Supports: * * Vanilla ISO9660 ISOs * * Microsoft Joliet and Rock Ridge extensions to the ISO9660 standard */ export default class IsoFS extends SynchronousFileSystem implements FileSystem { static readonly Name = "IsoFS"; static readonly Options: FileSystemOptions; /** * Creates an IsoFS instance with the given options. */ static Create(opts: IsoFSOptions, cb: BFSCallback<IsoFS>): void; static isAvailable(): boolean; private _data; private _pvd; private _root; private _name; /** * **Deprecated. Please use IsoFS.Create() method instead.** * * Constructs a read-only file system from the given ISO. * @param data The ISO file in a buffer. * @param name The name of the ISO (optional; used for debug messages / identification via getName()). */ private constructor(); getName(): string; diskSpace(path: string, cb: (total: number, free: number) => void): void; isReadOnly(): boolean; supportsLinks(): boolean; supportsProps(): boolean; supportsSynch(): boolean; statSync(p: string, isLstat: boolean): Stats; openSync(p: string, flags: FileFlag, mode: number): File; readdirSync(path: string): string[]; /** * Specially-optimized readfile. */ readFileSync(fname: string, encoding: string, flag: FileFlag): any; private _getDirectoryRecord; private _getStats; }