Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface FileSystemProvider

A FileSystemProvider provides the capabilities to read, write, discover, and to manage files and folders of the underlying (potentially virtual) file system. FileSystemProviders can be used to serve files from both the local disk as well as remote locations like ftp-servers, REST-services etc. A FileSystemProvider is registered for a certain scheme and can handle all resources whose uri does conform to that scheme.

Hierarchy

  • FileSystemProvider

Index

Properties

The FileSystemProviderCapabilities for this provider.

onDidChangeCapabilities: Event<void>

Event that is fired if the capabilities of this provider have changed.

onDidChangeFile: Event<readonly FileChange[]>

Event that is fired if a (watched) file in the filesystem of this provider has changed.

onFileWatchError: Event<void>

Event that is fired if an error occurred when watching files in the filesystem of this provider.

Methods

  • access(resource: URI, mode?: number): Promise<void>
  • close(fd: number): Promise<void>
  • fsPath(resource: URI): Promise<string>
  • mkdir(resource: URI): Promise<void>
  • read(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise<number>
  • readFile(resource: URI): Promise<Uint8Array>
  • readFileStream(resource: URI, opts: FileReadStreamOptions, token: CancellationToken): ReadableStreamEvents<Uint8Array>
  • readdir(resource: URI): Promise<[string, FileType][]>
  • stat(resource: URI): Promise<Stat>
  • Watch the given resource and react to changes by firing the {@link FileSystemProvider#onDidChangeFile} event.

    Parameters

    • resource: URI

      URI of the resource to be watched.

    • opts: WatchOptions

      Options to define if the resource should be watched recursively and to provide a set of resources that should be excluded from watching.

    Returns Disposable

    A Disposable that can be invoked to stop watching the resource.

  • write(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise<number>
  • writeFile(resource: URI, content: Uint8Array, opts: FileWriteOptions): Promise<void>