/** * Python os module - Shared code for browser and Node.js * * Contains pure path operations and constants that work in all environments. * * @module */ /** Environment variables (browser-safe empty object or Node's process.env) */ declare const environ: Record; /** Get an environment variable */ declare function getenv(key: string, defaultValue?: string): string | undefined; /** Path separator for the current platform */ declare const sep: string; /** Alternative path separator (Windows has both / and \) */ declare const altSep: string | null; /** Path list separator (: on Unix, ; on Windows) */ declare const pathSep: string; /** Line separator */ declare const lineSep: string; /** Current directory string */ declare const curDir = "."; /** Parent directory string */ declare const parDir = ".."; /** Extension separator */ declare const extSep = "."; /** Operating system name */ declare const name: string; /** Join path components intelligently */ declare function pathJoin(...paths: string[]): string; /** Return the base name of pathname */ declare function pathBasename(p: string, suffix?: string): string; /** Return the directory name of pathname */ declare function pathDirname(p: string): string; /** Split pathname into (head, tail) */ declare function pathSplitFn(p: string): [string, string]; /** Split pathname into root and extension */ declare function pathSplitExt(p: string): [string, string]; /** Return the extension of pathname */ declare function pathExtName(p: string): string; /** Test whether a path is absolute */ declare function pathIsAbs(p: string): boolean; /** Normalize a pathname */ declare function pathNormPath(p: string): string; /** Return relative path from start to path */ declare function pathRelPath(p: string, start?: string): string; /** Return common path prefix */ declare function pathCommonPath(paths: string[]): string; /** Expand ~ and ~user */ declare function pathExpandUser(p: string): string; /** Expand shell variables */ declare function pathExpandVars(p: string): string; /** Get current working directory */ declare function getCwd(): string; /** Get current working directory as bytes (same as getCwd in TS) */ declare function getCwdb(): string; /** Change current working directory */ declare function chdir(p: string): void; export { pathBasename as a, pathDirname as b, pathSplitFn as c, pathSplitExt as d, pathExtName as e, pathIsAbs as f, pathNormPath as g, pathRelPath as h, pathCommonPath as i, pathExpandUser as j, pathExpandVars as k, altSep as l, chdir as m, curDir as n, environ as o, pathJoin as p, extSep as q, getCwd as r, getCwdb as s, getenv as t, lineSep as u, name as v, parDir as w, pathSep as x, sep as y };