nfd.zig is a native file dialogue for zig. It's aim is to make Native File Dialogue, easy to use in zig programs
Operation | Status |
---|---|
File Open | |
Save Dialogue | |
Open Folder |
It targets zig master version. To use this, add this package in to your build.zon
.{
.dependencies = {
.nfd = .{
.url = "https://github.com/ArtemisX64/nfd.zig/archive/refs/tags/0.1.1.tar.gz",
.hash = "12206ba65e37f89f23c006e7f1323ff88263bccb38d39c1d08048d404c2d1f86fdf8"
},
},
}
In build.zig, add
const nfd = @import("nfd");
nfd.install(exe);
const nfd = @import("nfd");
nfd.openDialog(std.testing.allocator, null, null); //Requires an allocator to convert sentinal terminated slice to zig slice. Use openFileDialogZ() otherwise
const nfd = @import("nfd");
nfd.saveDialog(std.testing.allocator, null, null); //Requires an allocator to convert sentinal terminated slice to zig slice. Use saveDialogZ() otherwise
const nfd = @import("nfd");
nfd.pickFolder(std.testing.allocator, null, null); //Requires an allocator to convert sentinal terminated slice to zig slice. Use pickFolderZ() otherwise
- Linux
- Windows
- MacOS