Component evidence

uri/fileUri.ts

basedpyright · packages/pyright-internal/src/common/uri/fileUri.ts · typescript · MIT
dev-toolstag:knn-classified

File URI implementation for handling file paths in VS Code extensions.

Source preview first 800 characters · full source over MCP
// Source: https://github.com/DetachHead/basedpyright | License: MIT | Copyright Microsoft Corporation. All rights reserved
// Provided via justclaw.it.com; keep this notice with the code.
/*
 * fileUri.ts
 * Copyright (c) Microsoft Corporation.
 * Licensed under the MIT license.
 *
 * URI class that represents a file path. These URIs are always 'file' schemed.
 */

import { URI } from 'vscode-uri';
import { isArray } from '../core';
import {
    ensureTrailingDirectorySeparator,
    getDirectoryPath,
    getFileExtension,
    getFileName,
    getPathComponents,
    getPathSeparator,
    getRootLength,
    hasTrailingDirectorySeparator,
    isDiskPathRoot,
    resolvePaths,
    stripFileExtension,
} from '../pathUtils';
import { BaseUri, JsonObjType } from './baseUri';
import { cacheMethod

... (truncated -- full source via MCP)