Expand description
Native FS atoms - URI-aware, direct tokio::fs. Wind/Sky’s file:*
channels route here.
Modules§
- File
Clone Native - Wire method
file:copy/file:cloneFile.tokio::fs::copypreserves content but not xattrs/acls; callers that need metadata should use an OS-specific clone atom (future work). - File
Delete Native - Wire method
file:delete. Honours{ recursive }option for directories;useTrashis accepted but not yet implemented (future atom: trash.rs on macOS/Linux viatrash-rs, Windows via SHFileOp). - File
Exists Native - Wire method
file:exists. Boolean probe viatokio::fs::try_exists. - File
Mkdir Native - Wire method
file:mkdir.create_dir_allis recursive; matches the Electron default VS Code expects. - File
Read Native - Wire method
file:read/file:readFile. - File
Readdir Native - Wire method
file:readdir. Returns[[name, fileType]]matching VS Code’sReadDirResult(FileType: File=1, Directory=2, SymbolicLink=64 - combined via bitflags upstream, but the readdir callers only care about the per-entry value). - File
Realpath - Wire method
file:realpath. Emits a VS CodeUriComponents($mid: 1) so the renderer reviver promotes it to a realURIwith.fsPath/.with. Plain string would be treated as a relative path. - File
Rename Native - Wire method
file:move/file:rename. - File
Stat Native - Wire method
file:stat. Returns VS Code’sIStatshape viametadata_to_istat. Usessymlink_metadatato avoid following symlinks (matches Electron behaviour). Noise from benign ENOENTs on known VS Code probe paths is squelched viaIsBenignEnoent+DebugOnce. - File
Write Native - Wire method
file:write/file:writeFile. Accepts either a plain string body or a{ buffer: number[] | base64 }VSBuffer. Parent directory is created best-effort.