import { HashAlgorithm } from "../hash.mjs"; import { CopyOptions, FileStats, ListOptions, MoveOptions, WalkEntry, WalkOptions } from "./options.mjs"; import { File } from "./file.mjs"; //#region ../@warlock.js/fs/src/facade/directory.d.ts /** * A lazy, **immutable** handle to a directory path. The constructor does zero * IO; path helpers (`name`/`parent`/`file`/`dir`) are pure `node:path`. * `copy`/`move` return a NEW handle to the destination. `listFiles`/`listDirs` * return `File`/`Directory` handles (not bare strings). * * @example * const src = fs.dir("src"); * for (const f of await src.listFiles({ recursive: true })) { * if (f.extension === ".ts") { ... } * } */ declare class Directory { readonly path: string; constructor(path: string); /** Basename of this directory (`"users"`). */ get name(): string; /** Handle to the parent directory (pure path — no IO). */ parent(): Directory; /** Handle to a child file (pure path — no IO). */ file(...segments: string[]): File; /** Handle to a child directory (pure path — no IO). */ dir(...segments: string[]): Directory; ensure(): Promise; remove(): Promise; empty(): Promise; exists(): Promise; isEmpty(): Promise; count(): Promise; copy(to: string, options?: CopyOptions): Promise; move(to: string, options?: MoveOptions): Promise; stats(): Promise; size(): Promise; list(options?: ListOptions): Promise; listFiles(options?: ListOptions): Promise; listDirs(options?: ListOptions): Promise; walk(options?: WalkOptions): AsyncIterable; hash(algorithm?: HashAlgorithm): Promise; } //#endregion export { Directory }; //# sourceMappingURL=directory.d.mts.map