/** * Python glob module for TypeScript * * Provides Unix shell-style pathname pattern matching with async operations. * * @see {@link https://docs.python.org/3/library/glob.html | Python glob documentation} * @module */ /** * Return a list of paths matching a pathname pattern. * * The pattern may contain shell-style wildcards: * - `*` matches any number of characters * - `?` matches a single character * - `[seq]` matches any character in seq * - `[!seq]` matches any character not in seq * - `**` matches everything, including any subdirectories * * @param pattern - The glob pattern * @param options - Options object * @returns Promise of array of matching paths * * @example * ```typescript * await glob("*.txt") // All .txt files in current directory * await glob("**\/*.py") // All .py files recursively * await glob("/path/to/*.js") // All .js files in /path/to * ``` */ declare function glob(pattern: string, options?: { recursive?: boolean; rootDir?: string; includeHidden?: boolean; }): Promise; /** * Return an async iterator of paths matching a pathname pattern. * * @param pattern - The glob pattern * @param options - Options object * @returns AsyncGenerator of matching paths */ declare function iglob(pattern: string, options?: { recursive?: boolean; rootDir?: string; includeHidden?: boolean; }): AsyncGenerator; /** * Escape all special characters in a pathname. * * @param pathname - The path to escape * @returns Escaped path safe for use in glob patterns */ declare function escape(pathname: string): string; /** * Return true if the pattern contains any magic glob characters. * * @param pattern - The pattern to check * @returns True if pattern contains wildcards */ declare function hasMagic(pattern: string): boolean; /** * Return a list of all files matching pattern in directory and subdirectories. * This is an alias for glob with recursive=true. * * @param pattern - The glob pattern (without **) * @param rootDir - Root directory to search from * @returns Promise of array of matching paths */ declare function rglob(pattern: string, rootDir?: string): Promise; declare const globModule_escape: typeof escape; declare const globModule_glob: typeof glob; declare const globModule_hasMagic: typeof hasMagic; declare const globModule_iglob: typeof iglob; declare const globModule_rglob: typeof rglob; declare namespace globModule { export { globModule_escape as escape, globModule_glob as glob, globModule_hasMagic as hasMagic, globModule_iglob as iglob, globModule_rglob as rglob }; } export { glob as a, escape as e, globModule as g, hasMagic as h, iglob as i, rglob as r };