import * as fs from 'fs'; import URI from '@theia/core/lib/common/uri'; import { Event } from '@theia/core/lib/common/event'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; import { FileSystemProviderWithFileReadWriteCapability, FileSystemProviderWithOpenReadWriteCloseCapability, FileSystemProviderWithFileFolderCopyCapability, FileSystemProviderCapabilities, Stat, FileType, FileWriteOptions, FileOpenOptions, FileDeleteOptions, FileOverwriteOptions, FileChange, WatchOptions, FileUpdateOptions, FileUpdateResult, FileReadStreamOptions } from '../common/files'; import { FileSystemWatcherServer } from '../common/filesystem-watcher-protocol'; import { TextDocumentContentChangeEvent } from '@theia/core/shared/vscode-languageserver-protocol'; import { EncodingService } from '@theia/core/lib/common/encoding-service'; import { ReadableStreamEvents } from '@theia/core/lib/common/stream'; import { CancellationToken } from '@theia/core/lib/common/cancellation'; export declare namespace DiskFileSystemProvider { interface StatAndLink { stat: fs.Stats; symbolicLink?: { dangling: boolean; }; } } export declare class DiskFileSystemProvider implements Disposable, FileSystemProviderWithFileReadWriteCapability, FileSystemProviderWithOpenReadWriteCloseCapability, FileSystemProviderWithFileFolderCopyCapability { private readonly BUFFER_SIZE; private readonly onDidChangeFileEmitter; readonly onDidChangeFile: Event; private readonly onFileWatchErrorEmitter; readonly onFileWatchError: Event; protected readonly toDispose: DisposableCollection; protected readonly watcher: FileSystemWatcherServer; protected readonly encodingService: EncodingService; protected init(): void; readonly onDidChangeCapabilities: Event; protected _capabilities: FileSystemProviderCapabilities | undefined; get capabilities(): FileSystemProviderCapabilities; stat(resource: URI): Promise; access(resource: URI, mode?: number): Promise; fsPath(resource: URI): Promise; protected statLink(path: string): Promise; readdir(resource: URI): Promise<[string, FileType][]>; private toType; readFile(resource: URI): Promise; readFileStream(resource: URI, opts: FileReadStreamOptions, token: CancellationToken): ReadableStreamEvents; writeFile(resource: URI, content: Uint8Array, opts: FileWriteOptions): Promise; private mapHandleToPos; private writeHandles; private canFlush; open(resource: URI, opts: FileOpenOptions): Promise; close(fd: number): Promise; read(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise; private normalizePos; private updatePos; write(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise; private doWrite; mkdir(resource: URI): Promise; delete(resource: URI, opts: FileDeleteOptions): Promise; protected doDelete(filePath: string, opts: FileDeleteOptions): Promise; protected rimraf(path: string): Promise; protected rimrafMove(path: string): Promise; protected rimrafUnlink(path: string): Promise; rename(from: URI, to: URI, opts: FileOverwriteOptions): Promise; protected move(source: string, target: string): Promise; copy(from: URI, to: URI, opts: FileOverwriteOptions): Promise; private validateTargetDeleted; protected doCopy(source: string, target: string, copiedSourcesIn?: { [path: string]: boolean; }): Promise; protected mkdirp(path: string, mode?: number): Promise; protected doCopyFile(source: string, target: string, mode: number): Promise; watch(resource: URI, opts: WatchOptions): Disposable; updateFile(resource: URI, changes: TextDocumentContentChangeEvent[], opts: FileUpdateOptions): Promise; protected toFilePath(resource: URI): string; private toFileSystemProviderError; dispose(): void; } //# sourceMappingURL=disk-file-system-provider.d.ts.map