A Zig library providing cross-platform access to standard user directories like home, documents, and downloads.
Known Folders is a Zig library that provides a cross-platform API to access standard user directories such as home, documents, pictures, and downloads. It abstracts OS-specific path differences, making it easier to write portable applications that need to locate common folders. The library returns either a directory handle or a path string, with built-in handling for missing directories.
Zig developers building cross-platform applications that need to access standard user directories, such as desktop apps, utilities, or tools that manage user files.
Developers choose Known Folders for its minimal, focused API and reliable cross-platform behavior, eliminating the need to manually handle OS-specific path logic. It simplifies file system interactions while maintaining flexibility through configurable options.
Provides access to well-known folders across several operating systems
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Abstracts OS-specific path differences for folders like home and documents, ensuring uniform behavior across Windows, macOS, and Linux as stated in the design goals.
Offers only two main functions, open and getPath, keeping the interface simple and focused, which aligns with the library's minimalism philosophy.
Returns null for missing folders instead of throwing errors, as highlighted in the API, preventing crashes in applications.
Allows forcing XDG conventions on macOS via the xdg_on_mac configuration option, providing flexibility for specific use cases.
Requires Zig 0.16.0-dev.1976+ or later, a development version, which can hinder adoption in projects needing stable releases, as noted in the installation warning.
Sticks to folders common across all operating systems per the design goals, excluding platform-specific directories that might be necessary for advanced applications.
Installation involves multiple steps with Zig's build system, such as modifying build.zig.zon and build.zig, which can be challenging for newcomers.