FileLauncher

open class FileLauncher(pointer: <Error class: unknown class><<Error class: unknown class>>)

A GtkFileLauncher object collects the arguments that are needed to open a file with an application.

Depending on system configuration, user preferences and available APIs, this may or may not show an app chooser dialog or launch the default application right away.

The operation is started with the method@Gtk.FileLauncher.launch function.

To launch uris that don't represent files, use class@Gtk.UriLauncher.

Since

4.10

Constructors

Link copied to clipboard
constructor(file: <Error class: unknown class>? = null)

Creates a new GtkFileLauncher object.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open var alwaysAsk: Boolean

Whether to ask the user to choose an app for opening the file. If FALSE, the file might be opened with a default app or the previous choice.

Link copied to clipboard
open var file: <Error class: unknown class>?

The file to launch.

Link copied to clipboard
val gtkFileLauncherPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open var writable: Boolean

Whether to make the file writable for the handler.

Functions

Link copied to clipboard
open fun launch(parent: Window? = null, cancellable: <Error class: unknown class>? = null, callback: <Error class: unknown class>?)

Launch an application to open the file.

Link copied to clipboard
open fun launchFinish(result: <Error class: unknown class>): <Error class: unknown class><Boolean>

Finishes the method@Gtk.FileLauncher.launch call and returns the result.

Link copied to clipboard
open fun openContainingFolder(parent: Window? = null, cancellable: <Error class: unknown class>? = null, callback: <Error class: unknown class>?)

Launch a file manager to show the file in its parent directory.

Link copied to clipboard
open fun openContainingFolderFinish(result: <Error class: unknown class>): <Error class: unknown class><Boolean>

Finishes the method@Gtk.FileLauncher.open_containing_folder call and returns the result.