Skip to content

how to show file in finder/explorer? #87

Description

@thep0y

Is there any API that does the same thing as the code below?

// Windows
Command::new("explorer")
        .args(["/select,", "\"path\\to\\file""]) // The comma after select is not a typo
        .spawn()
        .unwrap();
// Alternatively there is a win32 api for this iirc which needs to be used for longer file paths i think.

// macOS
Command::new( "open" )
        .args(["-R", "path/to/file"]) // i don't have a mac so not 100% sure
        .spawn()
        .unwrap();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions