first commit

This commit is contained in:
2026-03-10 16:18:05 +00:00
commit 11f9c069b5
31635 changed files with 3187747 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
import type { Directory, File } from '../FileSystem';
export declare class PathUtilities {
/**
* Joins path segments into a single path.
* @param paths - An array of path segments.
* @returns A string representing the joined path.
*/
static join(...paths: (string | File | Directory)[]): string;
/**
* Resolves a relative path to an absolute path.
* @param from - The base path.
* @param to - The relative path.
* @returns A string representing the resolved path.
*/
static relative(from: string | File | Directory, to: string | File | Directory): string;
/**
* Checks if a path is absolute.
* @param path - The path to check.
* @returns `true` if the path is absolute, `false` otherwise.
*/
static isAbsolute(path: string | File | Directory): boolean;
/**
* Normalizes a path.
* @param path - The path to normalize.
* @returns A string representing the normalized path.
*/
static normalize(path: string | File | Directory): string;
/**
* Returns the directory name of a path.
* @param path - The path to get the directory name from.
* @returns A string representing the directory name.
*/
static dirname(path: string | File | Directory): string;
/**
* Returns the base name of a path.
* @param path - The path to get the base name from.
* @param ext - An optional file extension.
* @returns A string representing the base name.
*/
static basename(path: string | File | Directory, ext?: string): string;
/**
* Returns the extension of a path.
* @param path - The path to get the extension from.
* @returns A string representing the extension.
*/
static extname(path: string | File | Directory): string;
/**
* Parses a path into its components.
* @param path - The path to parse.
* @returns An object containing the parsed path components.
*/
static parse(path: string | File | Directory): {
root: string;
dir: string;
base: string;
ext: string;
name: string;
};
}
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pathUtilities/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAQrD,qBAAa,aAAa;IACxB;;;;OAIG;IACH,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,GAAG,MAAM;IAU5D;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM;IAevF;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO;IAQ3D;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM;IAUzD;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM;IAUvD;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM;IAStE;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM;IASvD;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG;QAC7C,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;KACd;CAQF"}

View File

@@ -0,0 +1,26 @@
export declare function format(sep: string, pathObject: {
dir?: string;
root?: string;
base?: string;
name?: string;
ext?: string;
}): string;
export declare function resolve(...args: string[]): string;
export declare function normalize(path: string): string;
export declare function isAbsolute(path: string): boolean;
export declare function join(...args: string[]): string;
export declare function relative(from: string, to: string): string;
export declare function toNamespacedPath(path: string): string;
export declare function dirname(path: string): string;
export declare function basename(path: string, suffix?: string): string;
export declare function extname(path: string): string;
export declare function parse(path: string): {
root: string;
dir: string;
base: string;
ext: string;
name: string;
};
export declare const sep = "/";
export declare const delimiter = ":";
//# sourceMappingURL=path.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/pathUtilities/path.ts"],"names":[],"mappings":"AA2FA,wBAAgB,MAAM,CACpB,GAAG,EAAE,MAAM,EACX,UAAU,EAAE;IACV,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,GACA,MAAM,CAOR;AAED,wBAAgB,OAAO,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,UA0BxC;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,UAgBrC;AACD,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,WAEtC;AACD,wBAAgB,IAAI,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,UAcrC;AACD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,UA6DhD;AACD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,UAG5C;AACD,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,UAoBnC;AACD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,UAiErD;AACD,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,UA+CnC;AACD,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM;;;;;;EAwEjC;AACD,eAAO,MAAM,GAAG,MAAM,CAAC;AACvB,eAAO,MAAM,SAAS,MAAM,CAAC"}

View File

@@ -0,0 +1,4 @@
export declare function encodeURLChars(path: string): string;
export declare function isUrl(url: string): boolean;
export declare function asUrl(url: string | URL): URL | null;
//# sourceMappingURL=url.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../src/pathUtilities/url.ts"],"names":[],"mappings":"AA2CA,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,UAgB1C;AAED,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,WAMhC;AAED,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,cAQtC"}