File tree Expand file tree Collapse file tree 4 files changed +5
-0
lines changed Expand file tree Collapse file tree 4 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ type OpenDirOptions struct {
1616}
1717
1818// OpenDirectory asks to open the directory containing a local file in the file browser.
19+ // The input parameter fd should be a file descriptor like the one given from [*os.File.Fd] for example.
1920func OpenDirectory (parentWindow string , fd uintptr , options * OpenDirOptions ) error {
2021 conn , err := dbus .SessionBus () // Shared connection, don't close.
2122 if err != nil {
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ type OpenFileOptions struct {
1616}
1717
1818// OpenFile asks to open a local file.
19+ // The input parameter fd should be a file descriptor like the one given from [*os.File.Fd] for example.
1920func OpenFile (parentWindow string , fd uintptr , options * OpenFileOptions ) error {
2021 conn , err := dbus .SessionBus () // Shared connection, don't close.
2122 if err != nil {
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ type OpenURIOptions struct {
2121}
2222
2323// OpenURI opens the given URI in the corresponding application.
24+ // Note that file:// URIs are explicitly not supported by this method.
25+ // To request opening local files, use [OpenFile].
2426func OpenURI (parentWindow , uri string , options * OpenURIOptions ) error {
2527 conn , err := dbus .SessionBus () // Shared connection, don't close.
2628 if err != nil {
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ const (
1717)
1818
1919// TrashFile sends a file to the trashcan. Applications are allowed to trash a file if they can open it in r/w mode.
20+ // The input parameter fd should be a file descriptor like the one given from [*os.File.Fd] for example.
2021func TrashFile (fd uintptr ) (TrashResult , error ) {
2122 conn , err := dbus .SessionBus () // Shared connection, don't close.
2223 if err != nil {
You can’t perform that action at this time.
0 commit comments