Skip to main content

Module file_operations

Module file_operations 

Source

Structs§

DeleteResult
Result of delete_imports call: edits + diagnostic stats.
DeleteStats
Diagnostic counters returned alongside delete edits.
FileRename
A single file rename: old absolute path → new absolute path.
RenameResult
Result of a rename_imports call: edits + diagnostic stats.
RenameStats
Diagnostic counters returned alongside edits so the caller can log them.

Functions§

apply_edits_to_cache
Apply computed edits to in-memory file content.
apply_text_edits
Apply a set of TextEdits to a source string and return the new content.
delete_imports
Compute import-statement removal edits needed when one or more files are deleted.
expand_folder_deletes
Expand delete entries that target folders into per-file paths.
expand_folder_deletes_from_paths
Expand delete entries using candidate filesystem paths.
expand_folder_renames
Expand rename entries that target folders into per-file renames.
expand_folder_renames_from_paths
Expand folder renames using candidate filesystem paths.
generate_scaffold
Generate scaffold content for a new .sol file.
normalize_path
Normalize a path by resolving . and .. components without requiring the file to exist on disk (unlike std::fs::canonicalize).
rename_imports
Compute import-path edits needed when one or more files are renamed/moved.
rename_imports_single
Backward-compatible wrapper: single rename, used by existing tests.