Implements

  • Resource

Constructors

Properties

_version: undefined | FileResourceVersion
acceptTextOnly: boolean = true
doSaveContentChanges: undefined | ((changes, options?) => Promise<void>) = ...

Type declaration

    • (changes, options?): Promise<void>
    • Applies incremental content changes to this resource.

      If a resource supports versioning clients can pass some version to check against it, if it is not provided latest version is used. It updates version to latest.

      Parameters

      • changes: TextDocumentContentChangeEvent[]
      • Optional options: ResourceSaveOptions

      Returns Promise<void>

      Throws

      ResourceError.NotFound if a resource not found or was not read yet

      Throws

      ResourceError.OutOfSync if latest resource version is out of sync with the given

fileService: FileService
limits: undefined | {
    memory?: number;
    size?: number;
}

Type declaration

  • Optional Readonly memory?: number
  • Optional Readonly size?: number
onDidChangeContents: Event<void> = ...
onDidChangeContentsEmitter: Emitter<void> = ...
onDidChangeReadOnly: Event<boolean | MarkdownString> = ...
onDidChangeReadOnlyEmitter: Emitter<boolean | MarkdownString> = ...
saveContentChanges?: ((changes, options?) => Promise<void>)

Type declaration

    • (changes, options?): Promise<void>
    • Applies incremental content changes to this resource.

      If a resource supports versioning clients can pass some version to check against it, if it is not provided latest version is used. It updates version to latest.

      Parameters

      • changes: TextDocumentContentChangeEvent[]
      • Optional options: ResourceSaveOptions

      Returns Promise<void>

      Throws

      ResourceError.NotFound if a resource not found or was not read yet

      Throws

      ResourceError.OutOfSync if latest resource version is out of sync with the given

saveContents?: ((content, options?) => Promise<void>)

Type declaration

    • (content, options?): Promise<void>
    • Rewrites the complete content for this resource. If a resource does not exist it will be created.

      If a resource supports versioning clients can pass some version to check against it, if it is not provided latest version is used.

      It updates version and encoding to latest.

      Parameters

      • content: string
      • Optional options: ResourceSaveOptions

      Returns Promise<void>

      Throws

      ResourceError.OutOfSync if latest resource version is out of sync with the given

saveStream?: ((content, options?) => Promise<void>)

Type declaration

    • (content, options?): Promise<void>
    • Rewrites the complete content for this resource. If a resource does not exist it will be created.

      If a resource supports versioning clients can pass some version to check against it, if it is not provided latest version is used.

      It updates version and encoding to latest.

      Parameters

      • content: Readable<string>
      • Optional options: ResourceSaveOptions

      Returns Promise<void>

      Throws

      ResourceError.OutOfSync if latest resource version is out of sync with the given

toDispose: DisposableCollection = ...
uri: URI
writingLock: Mutex = ...

Accessors

Methods

  • Parameters

    • Optional options: {
          encoding?: string;
      }
      • Optional encoding?: string

    Returns Promise<ReadableStream<string>>