Skip to main content

Module actions

Module actions 

Source
Expand description

Side-effecting operations: rm, rc-file edits, Windows PATH, self-delete.

Structs§

NoopSelfDelete
Test stub strategy used by integration tests to avoid actually self-deleting.
PathCleanupResult
PlatformSelfDelete
ProcessInfo

Traits§

SelfDeleteStrategy
Strategy abstraction so tests can override the actual self-delete step.

Functions§

apply_unix_path_cleanup
Read an rc file, strip the AtomCode installer block targeting prefix, write a .atomcode-uninstall.bak next to it, then write the cleaned file. No-op (returns modified=false) if the file is missing or no block found.
kill_process
Best-effort kill (SIGTERM on Unix, TerminateProcess on Windows) by PID.
list_atomcode_processes
List all atomcode-family processes excluding the calling process.
matches_atomcode_name
remove_path
Remove a file or directory. If needs_privilege is true on Unix, shells out to sudo rm -rf <path>; otherwise uses Rust stdlib.
strip_atomcode_path_block
Remove the canonical # Added by AtomCode installer\nexport PATH="<prefix>:$PATH" block(s) from a shell rc file’s content. Strict matching: requires both the comment and the export line targeting prefix. User-written PATH lines without the comment are left alone.
strip_path_entry
Remove an entry equal to target_literal (e.g. %LOCALAPPDATA%\AtomCode) or target_expanded (e.g. C:\Users\theo\AppData\Local\AtomCode) from a Windows PATH-style string. Comparison is case-insensitive and ignores trailing slashes. Returns None if no entry matched.
sudo_rm