MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / normalizePath

Method normalizePath

src/platform/vscode-path/resources.ts:239–252  ·  view source on GitHub ↗
(resource: URI)

Source from the content-addressed store, hash-verified

237 }
238
239 normalizePath(resource: URI): URI {
240 if (!resource.path.length) {
241 return resource;
242 }
243 let normalizedPath: string;
244 if (resource.scheme === Schemas.file) {
245 normalizedPath = URI.file(paths.normalize(originalFSPath(resource))).path;
246 } else {
247 normalizedPath = paths.posix.normalize(resource.path);
248 }
249 return resource.with({
250 path: normalizedPath
251 });
252 }
253
254 relativePath(from: URI, to: URI): string | undefined {
255 if (from.scheme !== to.scheme || !isEqualAuthority(from.authority, to.authority)) {

Callers

nothing calls this directly

Calls 4

originalFSPathFunction · 0.85
normalizeMethod · 0.80
fileMethod · 0.45
withMethod · 0.45

Tested by

no test coverage detected