Class MemoryFileManager

A simple manager to create and retrieve in-memory text files.

Hierarchy

  • MemoryFileManager

Constructors

Properties

Methods

Constructors

Properties

_documents: {
    [key: string]: MemoryFile;
} = {}

Type declaration

Methods

  • Creates a new in-memory text document or overwrites the existing one at path.

    Returns

    a new MemoryFile

    Parameters

    • path: string

      The virtual path to the file. Unlike a file system path, this can be an arbitrary string identifier, but it will be reported to VSCode as if it were a file system path. If another in-memory file exists at that path, this function will overwrite it.

    Returns MemoryFile

  • Gets an in-memory text document, if it exists.

    Returns

    The file, if it exists.

    Parameters

    • uri: Uri

      The vscode.Uri of the requested file. The scheme parameter is ignored, so this will return a file even if the scheme is not MEMORY_SCHEME. Only the path is required to identify a file.

    Returns undefined | MemoryFile

Generated using TypeDoc