-
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(); |
Beta Was this translation helpful? Give feedback.
Answered by
Byron
Jan 31, 2024
Replies: 1 comment 2 replies
-
You could see for yourself using |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
thep0y
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You could see for yourself using
dbg!(open::commands("path/to/file")
(API docs). For MacOS, the code is conveniently just a few lines.