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

    The workspace service.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    _ready: Deferred<void> = ...
    _roots: FileStat[] = []
    _workspace: undefined | FileStat
    deferredRoots: Deferred<FileStat[]> = ...
    envVariableServer: EnvVariablesServer
    fileService: FileService
    fsPreferences: FileSystemPreferences
    labelProvider: LabelProvider
    logger: ILogger
    messageService: MessageService
    onWorkspaceChangeEmitter: Emitter<FileStat[]> = ...
    onWorkspaceLocationChangedEmitter: Emitter<undefined | FileStat> = ...
    preferenceImpl: PreferenceService
    rootWatchers: Map<string, Disposable> = ...
    schemaUpdater: WorkspaceSchemaUpdater
    toDisposeOnWorkspace: DisposableCollection = ...
    untitledWorkspaceService: UntitledWorkspaceService
    windowService: WindowService
    windowTitleService: WindowTitleService
    workspaceFileService: WorkspaceFileService

    Accessors

    Methods

    • Return true if one of the paths in paths array is present in the workspace NOTE: You should always explicitly use / as the separator between the path segments.

      Parameters

      • paths: string[]

      Returns Promise<boolean>

    • Resolves to the default workspace URI as string.

      The default implementation tries to extract the default workspace location from the window.location.hash, then falls-back to the most recently used workspace root from the server.

      It is not ensured that the resolved workspace URI is valid, it can point to a non-existing location.

      Returns MaybePromise<undefined | string>

    • Returns the workspace root uri that the given file belongs to. In case that the file is found in more than one workspace roots, returns the root that is closest to the file. If the file is not from the current workspace, returns undefined.

      Parameters

      • uri: undefined | URI

        URI of the file

      Returns undefined | URI