@pkerschbaum/code-oss-file-service
Version:
VS Code ([microsoft/vscode](https://github.com/microsoft/vscode)) includes a rich "`FileService`" and "`DiskFileSystemProvider`" abstraction built on top of Node.js core modules (`fs`, `path`) and Electron's `shell` module. This package allows to use that
107 lines • 3.73 kB
TypeScript
import { URI } from '../../base/common/uri';
export declare namespace Schemas {
/**
* A schema that is used for models that exist in memory
* only and that have no correspondence on a server or such.
*/
const inMemory = "inmemory";
/**
* A schema that is used for setting files
*/
const vscode = "vscode";
/**
* A schema that is used for internal private files
*/
const internal = "private";
/**
* A walk-through document.
*/
const walkThrough = "walkThrough";
/**
* An embedded code snippet.
*/
const walkThroughSnippet = "walkThroughSnippet";
const http = "http";
const https = "https";
const file = "file";
const mailto = "mailto";
const untitled = "untitled";
const data = "data";
const command = "command";
const vscodeRemote = "vscode-remote";
const vscodeRemoteResource = "vscode-remote-resource";
const userData = "vscode-userdata";
const vscodeCustomEditor = "vscode-custom-editor";
const vscodeNotebook = "vscode-notebook";
const vscodeNotebookCell = "vscode-notebook-cell";
const vscodeNotebookCellMetadata = "vscode-notebook-cell-metadata";
const vscodeNotebookCellOutput = "vscode-notebook-cell-output";
const vscodeInteractive = "vscode-interactive";
const vscodeInteractiveInput = "vscode-interactive-input";
const vscodeSettings = "vscode-settings";
const vscodeWorkspaceTrust = "vscode-workspace-trust";
const vscodeTerminal = "vscode-terminal";
/**
* Scheme used internally for webviews that aren't linked to a resource (i.e. not custom editors)
*/
const webviewPanel = "webview-panel";
/**
* Scheme used for loading the wrapper html and script in webviews.
*/
const vscodeWebview = "vscode-webview";
/**
* Scheme used for extension pages
*/
const extension = "extension";
/**
* Scheme used as a replacement of `file` scheme to load
* files with our custom protocol handler (desktop only).
*/
const vscodeFileResource = "vscode-file";
/**
* Scheme used for temporary resources
*/
const tmp = "tmp";
/**
* Scheme used vs live share
*/
const vsls = "vsls";
}
declare class RemoteAuthoritiesImpl {
private readonly _hosts;
private readonly _ports;
private readonly _connectionTokens;
private _preferredWebSchema;
private _delegate;
setPreferredWebSchema(schema: 'http' | 'https'): void;
setDelegate(delegate: (uri: URI) => URI): void;
set(authority: string, host: string, port: number): void;
setConnectionToken(authority: string, connectionToken: string): void;
rewrite(uri: URI): URI;
}
export declare const RemoteAuthorities: RemoteAuthoritiesImpl;
declare class FileAccessImpl {
private static readonly FALLBACK_AUTHORITY;
/**
* Returns a URI to use in contexts where the browser is responsible
* for loading (e.g. fetch()) or when used within the DOM.
*
* **Note:** use `dom.ts#asCSSUrl` whenever the URL is to be used in CSS context.
*/
asBrowserUri(uri: URI): URI;
asBrowserUri(moduleId: string, moduleIdToUrl: {
toUrl(moduleId: string): string;
}): URI;
/**
* Returns the `file` URI to use in contexts where node.js
* is responsible for loading.
*/
asFileUri(uri: URI): URI;
asFileUri(moduleId: string, moduleIdToUrl: {
toUrl(moduleId: string): string;
}): URI;
private toUri;
}
export declare const FileAccess: FileAccessImpl;
export {};
//# sourceMappingURL=network.d.ts.map