nfd-rs is a Rust binding to the library nativefiledialog, that provides a convenient cross-platform interface...

nfd-rs is a Rust binding to the library

nfd-rs

nfd-rs is a Rust binding to the library nativefiledialog, that provides a convenient cross-platform interface to opening file dialogs on Linux, OS X and Windows.

This crate has been tested on Mac, Window and Linux (Ubuntu 14.04) and supports single/mutliple and save dialogs, notice APIs may break with newer versions.

Usage

  • Add the dependency nfd in your

  • Open a single file dialog

  • Open a multi file dialog using builder with jpg files as filter

Screenshot

Issues

Collection of the latest Issues

virtualritz

virtualritz

0

I may be missing something but I am not aware of any OS where the file chooser lets you pick multiple files in different folders.

Assuming this is the case, the path of all files returned by OkayMultiple will always be the same for all elements of the Vec.

Would it then not make sense to change the return value to a tuple (String, Vec<String>) that returns the path in the first string and just the file names or folders, omitting the path, in the Vec<String>?

ctaque

ctaque

1

When I open the system dialog with open_file_dialog I can't navigate between the folders :

The buttons event on the sidebar are disabled, and I don't land on the Pictures folder

sdicker8

sdicker8

0

It looks like nativefiledialog has some significant updates since 2016, particularly for win32 and osx. Would it be fairly easy to use the latest source files from that project? Thank you.

ben-wallis

ben-wallis

0

I'm trying to build using the stable-x86_64-pc-windows-gnu toolchain and I'm getting this error:

cargo:warning=nativefiledialog/src/nfd_win.cpp:118:24: error: 'sprintf_s' was not declared in this scope

Is this because nfd assumes you'll be building using MSVC and sprintf_s is Microsoft-specific? Building against stable-x86_64-pc-windows-msvc works fine.

nico-abram

nico-abram

1

I got a build error saying cargo:warning=nativefiledialog/src/nfd_gtk.c:10:21: fatal error: gtk/gtk.h: No such file or directory when trying to run a binary using this in travis CI. It would be nice if the dependency was specified in the readme.

pcrockett

pcrockett

2

When I add nfd = "0.0.4" to Cargo.toml on Windows, I encounter issue #14.

When I use nfd = { git = "https://github.com/saurvs/nfd-rs.git" } instead, everything works fine.

So it looks to me like #14 was fixed, but never published to crates.io. Would it be possible to do a version bump and publish?

woelper

woelper

1

Sorry for this potentially stupid issue but I have a very obscure use case where I trigger this very nice library from an electron app that communicates with a rust backend via rest/rocket. However the native file browser always opens in the background, making it hard or impossible to see. Is there a way to bring it to focus automatically?

codeyash

codeyash

0

Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

Thank you for hardwork!!

Information - Updated Jun 22, 2022

Stars: 150
Forks: 19
Issues: 13

Repositories & Extras

Cross-platform Terminal Manipulation Library

a simple terminal editor for both unix and windows clients

Cross-platform Terminal Manipulation Library

Cross-platform library for system information fetching

Examples can be found Async-first

Cross-platform library for system information fetching

Cross-platform filesystem notification library for Rust

Add file-system notifications via this library for Rust

Cross-platform filesystem notification library for Rust

Cross-platform, realtime MIDI processing in Rust

You can find some examples in the examples directory

Cross-platform, realtime MIDI processing in Rust

Cross-platform network scan library

This library requires the ability to create raw sockets

Cross-platform network scan library

Cross-platform music tagger written in Rust, Vue

You might need to install additional dependencies to make One Tagger work:

Cross-platform music tagger written in Rust, Vue

Cross-platform command-line application used to analyze specific metrics from the CKJM Extended Tool

ckjm_analyzer --jar &lt;JAR_PATH&gt; --path &lt;PROJECTS_PATH&gt;

Cross-platform command-line application used to analyze specific metrics from the CKJM Extended Tool

Cross platform FFI bindings for FFmpeg inner libraries

Linking FFmpeg libraries for you

Cross platform FFI bindings for FFmpeg inner libraries
Facebook Instagram Twitter GitHub Dribbble
Privacy