proton_shell

Native shell helpers for MoonBit.

shell
desktop
native
windows
Download zip
Version
0.2.4
License
Apache-2.0
Last updated
3 hours ago
Downloads
98

moonbit-community/proton_shell does not have a README file

beep

fn beep() -> Result[Unit, String]

Plays the operating system's default alert sound.

On Windows this calls MessageBeep. On macOS and Linux it writes the terminal bell escape to stderr. Returns Ok(()) when the platform has a beep backend.

ensure_supported

fn ensure_supported() -> Result[Unit, String]

Verifies that the current native platform is supported by this package.

Returns Ok(()) on supported platforms and an explanatory Err(String) on unsupported targets.

is_supported

fn is_supported() -> Bool

Returns true when the current native target has a shell backend that this package knows how to call.

open

fn open(target : String) -> Result[Unit, String]

Opens target through the native shell.

On Windows this calls ShellExecuteW with the "open" verb. Returns Ok(()) on success or Err(String) on unsupported platforms or launch failures.

reveal_item

fn reveal_item(path : String) -> Result[Unit, String]

Reveals path in the native file manager.

On Windows this opens Explorer with /select,"<path>". Returns Ok(()) on success or Err(String) on unsupported platforms or launch failures.

trash_item

fn trash_item(path : String) -> Result[Unit, String]

Moves path to the operating-system trash or recycle bin.

On Windows this uses the recycle bin (the item can still be restored), on macOS this uses the Finder Trash (supporting "Put Back"), and on Linux this delegates to gio trash. Returns Err(String) on unsupported platforms or when the item could not be trashed.

Source Files

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io