Theia API Documentation v1.65.0
    Preparing search index...

    Implements

    Index

    Constructors

    Properties

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

    Type Declaration

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

          Parameters

          Returns Promise<void>

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

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

    fileService: FileService
    limits: undefined | { memory?: number; size?: number }
    onDidChangeContents: Event<void> = ...
    onDidChangeContentsEmitter: Emitter<void> = ...
    onDidChangeReadOnly: Event<boolean | MarkdownString> = ...
    onDidChangeReadOnlyEmitter: Emitter<boolean | MarkdownString> = ...
    saveContentChanges?: (
        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.

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

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

    saveContents?: (content: string, options?: ResourceSaveOptions) => 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.

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

    saveStream?: (
        content: Readable<string>,
        options?: ResourceSaveOptions,
    ) => 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.

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

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

    Accessors

    Methods

    • Reads latest content of this resource.

      If a resource supports versioning it updates version to latest. If a resource supports encoding it updates encoding to latest.

      Parameters

      • Optionaloptions: { encoding?: string }

      Returns Promise<string>

      ResourceError.NotFound if a resource not found