Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FileResource

Hierarchy

  • FileResource

Implements

Index

Constructors

constructor

Properties

Protected _version

_version: FileResourceVersion | undefined

Protected acceptTextOnly

acceptTextOnly: boolean = true

Protected Readonly fileService

fileService: FileService

Protected limits

limits: FileReadStreamOptions["limits"]

Readonly onDidChangeContents

onDidChangeContents: Event<void> = this.onDidChangeContentsEmitter.event

Protected Readonly onDidChangeContentsEmitter

onDidChangeContentsEmitter: Emitter<void> = new Emitter<void>()

Protected Readonly options

Optional saveContentChanges

saveContentChanges: Resource["saveContentChanges"]

Protected Readonly toDispose

toDispose: DisposableCollection = new DisposableCollection()

Readonly uri

uri: URI

Accessors

encoding

  • get encoding(): string | undefined

version

Methods

dispose

  • dispose(): void

Protected doSaveContentChanges

  • doSaveContentChanges(changes: ({ range: Range; rangeLength?: undefined | number; text: string } | { text: string })[], options: undefined | ResourceSaveOptions): Promise<void>

Protected doWrite

guessEncoding

  • guessEncoding(): Promise<string>

Protected isInSync

  • isInSync(): Promise<boolean>

readContents

  • readContents(options?: undefined | { encoding?: undefined | string }): Promise<string>

readStream

  • readStream(options?: undefined | { encoding?: undefined | string }): Promise<ReadableStream<string>>

saveContents

saveStream

Protected shouldOpenAsText

  • shouldOpenAsText(error: string): Promise<boolean>

Protected shouldOverwrite

  • shouldOverwrite(): Promise<boolean>

Protected sync

  • sync(): Promise<void>

Protected updateSavingContentChanges

  • updateSavingContentChanges(): void