/** * Python pathlib module for TypeScript - Browser version * * Provides object-oriented filesystem paths. * Filesystem operations throw errors in browser environment. * * @see {@link https://docs.python.org/3/library/pathlib.html | Python pathlib documentation} * @module */ /** * Path class representing a filesystem path. * Provides path manipulation; filesystem operations throw in browser. */ declare class Path { private readonly _path; constructor(...pathSegments: string[]); static of(...pathSegments: string[]): Path; get name(): string; get stem(): string; get suffix(): string; get suffixes(): string[]; get parent(): Path; get parents(): Path[]; get parts(): string[]; get anchor(): string; get root(): string; isAbsolute(): boolean; isRelativeTo(other: string | Path): boolean; joinpath(...pathSegments: (string | Path)[]): Path; div(other: string | Path): Path; withName(name: string): Path; withStem(stem: string): Path; withSuffix(suffix: string): Path; toString(): string; valueOf(): string; [Symbol.toPrimitive](_hint: string): string; exists(): Promise; isFile(): Promise; isDir(): Promise; isSymlink(): Promise; stat(): Promise; lstat(): Promise; readText(_encoding?: BufferEncoding): Promise; writeText(_content: string, _encoding?: BufferEncoding): Promise; readBytes(): Promise; writeBytes(_content: Uint8Array): Promise; mkdir(_options?: { parents?: boolean; existOk?: boolean; mode?: number; }): Promise; rmdir(): Promise; unlink(): Promise; rename(_target: string | Path): Promise; replace(_target: string | Path): Promise; resolve(): Path; absolute(): Path; readlink(): Promise; symlinkTo(_target: string | Path): Promise; linkTo(_target: string | Path): Promise; chmod(_mode: number): Promise; touch(_options?: { mode?: number; existOk?: boolean; }): Promise; iterdir(): Promise; glob(_pattern: string): Promise; rglob(_pattern: string): Promise; } /** * PurePath provides path operations without filesystem access. * In browser, this is identical to Path. */ declare const PurePath: typeof Path; declare const PurePosixPath: typeof Path; declare const PureWindowsPath: typeof Path; declare const PosixPath: typeof Path; declare const WindowsPath: typeof Path; type pathlibModule_Path = Path; declare const pathlibModule_Path: typeof Path; declare const pathlibModule_PosixPath: typeof PosixPath; declare const pathlibModule_PurePath: typeof PurePath; declare const pathlibModule_PurePosixPath: typeof PurePosixPath; declare const pathlibModule_PureWindowsPath: typeof PureWindowsPath; declare const pathlibModule_WindowsPath: typeof WindowsPath; declare namespace pathlibModule { export { pathlibModule_Path as Path, pathlibModule_PosixPath as PosixPath, pathlibModule_PurePath as PurePath, pathlibModule_PurePosixPath as PurePosixPath, pathlibModule_PureWindowsPath as PureWindowsPath, pathlibModule_WindowsPath as WindowsPath }; } export { Path as P, WindowsPath as W, PosixPath as a, PurePath as b, PurePosixPath as c, PureWindowsPath as d, pathlibModule as p };