Merge pull request #2161 from zed-industries/community/3-reveal-in-finder
Introduce Reveal in Finder
This commit is contained in:
commit
fbd23986e3
6 changed files with 31 additions and 40 deletions
|
@ -599,6 +599,19 @@ impl platform::Platform for MacPlatform {
|
|||
}
|
||||
}
|
||||
|
||||
fn reveal_path(&self, path: &Path) {
|
||||
unsafe {
|
||||
let full_path = ns_string(path.to_str().unwrap_or(""));
|
||||
let root_full_path = ns_string("");
|
||||
let workspace: id = msg_send![class!(NSWorkspace), sharedWorkspace];
|
||||
msg_send![
|
||||
workspace,
|
||||
selectFile: full_path
|
||||
inFileViewerRootedAtPath: root_full_path
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
fn write_credentials(&self, url: &str, username: &str, password: &[u8]) -> Result<()> {
|
||||
let url = CFString::from(url);
|
||||
let username = CFString::from(username);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue