UNPKG

1.34 kBTypeScriptView Raw
1import URI from '../common/uri';
2import { MaybePromise, SelectionService } from '../common';
3import { EnvVariablesServer } from '../common/env-variables';
4import { FrontendApplication } from './frontend-application';
5import { FrontendApplicationContribution } from './frontend-application-contribution';
6import { Widget } from './widgets';
7export declare class UserWorkingDirectoryProvider implements FrontendApplicationContribution {
8 protected readonly selectionService: SelectionService;
9 protected readonly envVariables: EnvVariablesServer;
10 protected lastOpenResource: URI | undefined;
11 configure(app: FrontendApplication): void;
12 protected setLastOpenResource(widget?: Widget): void;
13 /**
14 * @returns A {@link URI} that represents a good guess about the directory in which the user is currently operating.
15 *
16 * Factors considered may include the current widget, current selection, user home directory, or other application state.
17 */
18 getUserWorkingDir(): Promise<URI>;
19 protected getFromSelection(): MaybePromise<URI | undefined>;
20 protected getFromLastOpenResource(): MaybePromise<URI | undefined>;
21 protected getFromUserHome(): MaybePromise<URI>;
22 protected ensureIsDirectory(uri?: URI): MaybePromise<URI | undefined>;
23}
24//# sourceMappingURL=user-working-directory-provider.d.ts.map
\No newline at end of file