browserfs
Version:
A filesystem in your browser!
37 lines (36 loc) • 1.82 kB
TypeScript
import file_system = require('../core/file_system');
import { ApiError } from '../core/api_error';
import { FileFlag } from '../core/file_flag';
import file = require('../core/file');
import Stats from '../core/node_fs_stats';
export default class XmlHttpRequest extends file_system.BaseFileSystem implements file_system.FileSystem {
private _index;
prefixUrl: string;
constructor(listingUrlOrObj: string | Object, prefixUrl?: string);
empty(): void;
private getXhrPath(filePath);
_requestFileSizeAsync(path: string, cb: (err: ApiError, size?: number) => void): void;
_requestFileSizeSync(path: string): number;
private _requestFileAsync(p, type, cb);
private _requestFileAsync(p, type, cb);
private _requestFileAsync(p, type, cb);
private _requestFileSync(p, type);
private _requestFileSync(p, type);
private _requestFileSync(p, type);
getName(): string;
static isAvailable(): boolean;
diskSpace(path: string, cb: (total: number, free: number) => void): void;
isReadOnly(): boolean;
supportsLinks(): boolean;
supportsProps(): boolean;
supportsSynch(): boolean;
preloadFile(path: string, buffer: NodeBuffer): void;
stat(path: string, isLstat: boolean, cb: (e: ApiError, stat?: Stats) => void): void;
statSync(path: string, isLstat: boolean): Stats;
open(path: string, flags: FileFlag, mode: number, cb: (e: ApiError, file?: file.File) => void): void;
openSync(path: string, flags: FileFlag, mode: number): file.File;
readdir(path: string, cb: (e: ApiError, listing?: string[]) => void): void;
readdirSync(path: string): string[];
readFile(fname: string, encoding: string, flag: FileFlag, cb: (err: ApiError, data?: any) => void): void;
readFileSync(fname: string, encoding: string, flag: FileFlag): any;
}