Skip to main content

reveal_in_file_manager

Function reveal_in_file_manager 

Source
pub fn reveal_in_file_manager(path: &Path) -> Result<(), String>
Expand description

Spawn the per-OS file-manager “reveal this file” command. macOS uses open -R <path>, Windows uses explorer /select,<path>, Linux uses xdg-open <parent-dir> (most distros don’t have a portable “select” verb).

§Errors

Returns an error string if the spawn itself failed (binary not on PATH). Non-zero exit from the spawned command is treated as success because the file manager may legitimately background the window and return immediately.