@pulzar/core
Version:
Next-generation Node.js framework for ultra-fast web applications with zero-reflection DI, GraphQL, WebSockets, events, and edge runtime support
65 lines • 1.88 kB
TypeScript
/**
* Normalize path separators for cross-platform compatibility
*/
export declare function normalizePath(path: string): string;
/**
* Join paths with proper normalization
*/
export declare function joinPaths(...paths: string[]): string;
/**
* Resolve path with proper normalization
*/
export declare function resolvePath(...paths: string[]): string;
/**
* Get directory name with proper normalization
*/
export declare function getDirName(path: string): string;
/**
* Get base name with proper normalization
*/
export declare function getBaseName(path: string, ext?: string): string;
/**
* Get file extension
*/
export declare function getExtension(path: string): string;
/**
* Check if path is absolute
*/
export declare function isAbsolutePath(path: string): boolean;
/**
* Make path relative to base directory
*/
export declare function makeRelative(base: string, path: string): string;
/**
* Ensure path ends with separator
*/
export declare function ensureTrailingSlash(path: string): string;
/**
* Remove trailing slash from path
*/
export declare function removeTrailingSlash(path: string): string;
/**
* Get common prefix from array of paths
*/
export declare function getCommonPrefix(paths: string[]): string;
/**
* Check if path matches pattern (supports glob-like patterns)
*/
export declare function matchesPattern(path: string, pattern: string): boolean;
/**
* Get all parent directories of a path
*/
export declare function getParentDirectories(path: string): string[];
/**
* Check if path is within base directory
*/
export declare function isWithinBase(base: string, path: string): boolean;
/**
* Convert Windows path to Unix style
*/
export declare function toUnixPath(path: string): string;
/**
* Convert Unix path to Windows style
*/
export declare function toWindowsPath(path: string): string;
//# sourceMappingURL=path.d.ts.map