Function bp3d_os::open::open

source ·
pub fn open<'a, T: Into<Url<'a>>>(url: T) -> bool
Available on crate feature open only.
Expand description

Opens an URL using the default associated app for the URL scheme.

Returns true if the operation has succeeded.

Platform specific behavior

  • On macOS, this function calls openURL in NSWorkspace.

  • On iOS, this function currently returns false.

  • On Windows, this function calls ShellExecuteW with the “open” operation.

  • On Linux and most other unix systems, this function calls the dbus function ShowFolders in org.freedesktop.FileManager1 when the URL is a path to a directory, otherwise the function attempts to execute the xdg-open command line tool with the URL string as argument.

Arguments

  • url: the URL to open.

returns: bool