Expand description
File-system-domain handlers for CocoonService. Eleven entry points
covering read/write/stat, directory ops, watch, glob/text search, and
delete/rename/copy/create-directory.
Modules§
- Copy
File - Copy a file, creating any missing target parents first.
- Create
Directory - Create a directory (and any missing parents).
- Delete
File - Remove a file or recursively remove a directory.
- Find
Files - Walk every workspace root collecting paths that match
pattern(globset). Falls back to cwd when no roots are open. - Find
Text InFiles - Substring search across the workspace, capped at 1,000 matches. Skips
hidden directories plus
node_modulesandtarget. Runs the walk intokio::task::spawn_blockingso the event loop stays responsive. - Read
File - Read a file from disk and return its bytes (always tagged
utf-8- the encoding negotiation lives in Cocoon). - Readdir
- Enumerate the entries of a directory by name.
- Rename
File - Rename a file or directory, creating any missing target parents first.
- Stat
- Inspect a path: type, size, mtime in ms-since-epoch.
- Watch
File watch_filegRPC endpoint - Cocoon calls this when an extension usesvscode.workspace.createFileSystemWatcher. Routes to Mountain’sFileWatcherProvider::RegisterWatcherso OS events (FSEvents on macOS, inotify on Linux) flow back to Cocoon as$fileWatcher:eventgRPC notifications which Cocoon fans out to extensiononDidChangeFilelisteners.- Write
File - Write bytes to disk, creating any missing parent directories.