import type { UniversalPHP } from './universal-php'; export interface FileTree extends Record { } export interface WriteFilesOptions { /** * Whether to wipe out the contents of the * root directory before writing the new files. */ rmRoot?: boolean; } /** * Writes multiple files to a specified directory in the Playground * filesystem. * * Every key in the file tree must resolve inside the target directory. Paths * are validated before any existing files are removed so an invalid nested * entry cannot leave the target directory half-cleared. * * @example ```ts * await writeFiles(php, '/test', { * 'file.txt': 'file', * 'sub/file.txt': 'file', * 'sub1/sub2/file.txt': 'file', * }); * ``` * * @param php * The Playground filesystem to write to. * @param root * The directory that receives the file tree. * @param newFiles * Files and nested directories keyed by relative paths. * @param options * Write behavior such as clearing the root first. */ export declare function writeFiles(php: UniversalPHP, root: string, newFiles: FileTree, { rmRoot }?: WriteFilesOptions): Promise;