/** * directory() resource — manage directories on target hosts. * * `check()` tests whether the directory exists with the desired attributes. * `apply()` creates/removes the directory and sets ownership/permissions. */ import type { ExecutionContext, ResourceCallMeta, ResourceDefinition, ResourceSchema } from "../core/types.ts"; /** Input options for the directory resource. */ export type DirectoryInput = { /** Absolute path to the directory. */ path: string; /** File mode (e.g. "0755"). */ mode?: string | undefined; /** Owner user. */ owner?: string | undefined; /** Owner group. */ group?: string | undefined; /** Whether the directory should exist. Default: 'present'. */ state?: "present" | "absent" | undefined; /** Use mkdir -p for recursive creation. Default: true. */ recursive?: boolean | undefined; }; /** Output of a successful directory resource. */ export type DirectoryOutput = { path: string; changed: boolean; }; /** Schema for the directory resource. */ export declare const directorySchema: ResourceSchema; /** ResourceDefinition for directory. */ export declare const directoryDefinition: ResourceDefinition; /** * Create a bound `directory()` function for a given execution context. * * Usage in recipes: * ```ts * const directory = createDirectory(ctx) * await directory({ path: '/var/www/app', owner: 'www-data', mode: '0755' }) * ``` */ export declare function createDirectory(ctx: ExecutionContext): (input: DirectoryInput, meta?: ResourceCallMeta) => Promise>; //# sourceMappingURL=directory.d.ts.map