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

Readonly capabilities

The FileSystemProviderCapabilities for this provider.

Readonly onDidChangeCapabilities

onDidChangeCapabilities: Event<void>

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

Readonly onDidChangeFile

onDidChangeFile: Event<readonly FileChange[]>

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

Readonly onFileWatchError

onFileWatchError: Event<void>

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

Methods

Optional access

  • access(resource: default, mode?: number): Promise<void>

Optional close

  • close(fd: number): Promise<void>

Optional copy

delete

Optional fsPath

  • fsPath(resource: default): Promise<string>

mkdir

  • mkdir(resource: default): Promise<void>

Optional open

Optional read

  • read(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise<number>

Optional readFile

  • readFile(resource: default): Promise<Uint8Array>

Optional readFileStream

  • readFileStream(resource: default, opts: FileReadStreamOptions, token: CancellationToken): ReadableStreamEvents<Uint8Array>

readdir

  • readdir(resource: default): Promise<[string, FileType][]>

rename

stat

  • stat(resource: default): Promise<Stat>

Optional updateFile

watch

  • Watch the given resource and react to changes by firing the {@link FileSystemProvider#onDidChangeFile} event.

    Parameters

    • resource: default

      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.

Optional write

  • write(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise<number>

Optional writeFile

  • writeFile(resource: default, content: Uint8Array, opts: FileWriteOptions): Promise<void>