Expand description
§FileSystemProvider - Write Operations
Implements FileSystemWriter
for MountainEnvironment. Every function calls
Utility::PathSecurity::IsPathAllowedForAccess before any I/O.
§Functions
write_file_impl- writes bytes to a path. Enforces a 1 GB content guard,create/overwriteflag semantics (mirroringvscode.workspace.fs.writeFile), and auto-creates missing parent directories. Note: currently writes directly; the inline comment documents the planned atomic-rename pattern (write-to-temp → fsync → rename).create_directory_impl- creates a directory, optionally recursively. Validates that the parent is not a regular file.delete_impl- removes a file or directory.recursivecontrolsremove_dir_allvsremove_dir._use_trashis stubbed; thetrashcrate integration is planned. Idempotent:NotFoundis treated as success.rename_impl- callstokio::fs::rename(POSIX-atomic within a filesystem). Both source and target are path-security checked.copy_impl- copies a file or directory tree. Directories use the privatecopy_directory_recursivehelper, which walks an explicit stack to avoid deep async-recursion stack overflows.create_file_impl- thin wrapper overwrite_file_implwith empty content,create=true,overwrite=false.
Functions§
- copy_
directory_ 🔒recursive - Recursively copy a directory tree from
sourceintotarget. Iterative (uses an explicit stack of(SrcDir, DstDir)) so it can’t blow the Tokio task stack on very deep trees. Files inside re-usetokio::fs::copyfor fast path; directories are created withcreate_dir. Symlinks are dereferenced. - copy_
impl 🔒 - Copy operations implementation for MountainEnvironment
- create_
directory_ 🔒impl - CreateDirectory operations implementation for MountainEnvironment
- create_
file_ 🔒impl - CreateFile operations implementation for MountainEnvironment
- delete_
impl 🔒 - Delete operations implementation for MountainEnvironment
- rename_
impl 🔒 - Rename operations implementation for MountainEnvironment
- write_
file_ 🔒impl - Write operations implementation for MountainEnvironment