mirror of
https://github.com/cdr/code-server.git
synced 2026-01-24 00:52:16 +01:00
13 lines
461 B
TypeScript
13 lines
461 B
TypeScript
import { URITransformer } from 'vs/base/common/uriIpc';
|
|
|
|
export const getUriTransformer = (remoteAuthority: string): URITransformer => {
|
|
return new URITransformer(remoteAuthority);
|
|
};
|
|
|
|
/**
|
|
* Encode a path for opening via the folder or workspace query parameter. This
|
|
* preserves slashes so it can be edited by hand more easily.
|
|
*/
|
|
export const encodePath = (path: string): string => {
|
|
return path.split('/').map((p) => encodeURIComponent(p)).join('/');
|
|
};
|