Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • FileResource

Implements

  • Resource

Index

Constructors

Properties

_version: undefined | FileResourceVersion
acceptTextOnly: boolean = true
doSaveContentChanges: undefined | ((changes: TextDocumentContentChangeEvent[], options?: ResourceSaveOptions) => Promise<void>) = ...
fileService: FileService
limits: undefined | { memory?: number; size?: number }
onDidChangeContents: Event<void> = ...
onDidChangeContentsEmitter: Emitter<void> = ...
saveContentChanges?: ((changes: TextDocumentContentChangeEvent[], options?: ResourceSaveOptions) => Promise<void>)

Type declaration

    • (changes: TextDocumentContentChangeEvent[], options?: ResourceSaveOptions): 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.

      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

      Parameters

      • changes: TextDocumentContentChangeEvent[]
      • Optional options: ResourceSaveOptions

      Returns Promise<void>

toDispose: DisposableCollection = ...
uri: URI

Accessors

  • get encoding(): undefined | string

Methods

  • dispose(): void
  • doWrite(content: string | Readable<string>, options?: ResourceSaveOptions): Promise<void>
  • guessEncoding(): Promise<string>
  • isInSync(): Promise<boolean>
  • readContents(options?: { encoding?: string }): Promise<string>
  • readStream(options?: { encoding?: string }): Promise<ReadableStream<string>>
  • saveContents(content: string, options?: ResourceSaveOptions): Promise<void>
  • saveStream(content: Readable<string>, options?: ResourceSaveOptions): Promise<void>
  • shouldOpenAsText(error: string): Promise<boolean>
  • shouldOverwrite(): Promise<boolean>
  • sync(): Promise<void>
  • updateSavingContentChanges(): void