Dire
Complete cross-platform solution for data and user directories discovery.
|
[!NOTE] This started as a simple port of
dirs-dev/directories-rs
, but deviated in the process, the exact details can be found here.
A complete cross-platform solution for user and data directories discovery with OOTB project support.
**Dire ** | dirs-dev/directories-rs | sago007/PlatformFolders | |
---|---|---|---|
C++ | ✅ | ❌ (Rust) | ✅ |
Support for Windows, Linux and Darwin | ✅ | ✅ | ✅ |
Support for Base, User and Project dirs | ✅ | ✅ | ❌ |
Structure bundles API | ✅ | ❌ | ✅ |
Standalone functions API | ✅ | ❌ | ❌ |
An abstract example:
Tests should be simple, readable and comprehensive enough to show all possible usage examples as well.
This project started because I wanted a nice cross-platform way of discovering typical data directories.
The only feasible alternative I found was sago007/PlatformFolders
, but it doesn't necessarily expose the API I'd like to use.
There's an awesome Rust crate dirs-dev/directories-rs
which very much would fit my needs, but it's.. Rust, not C++ - so I wrote this.
***** Only if there will be need to, e.g. someone asks for that or it will be a feasible fix for an issue.
[ ] Package returned dirs in special objects with the following methods (this is not necessarily trivial as the notion of writable
or readable
is really dependent)*****:
writable() -> bool
- cross platform checking if the dir is writable into (we mean every notion of writable - delete, update, create new file, etc.)readable() -> bool
- cross platform checking if the dir is readble (same here)writable_and_readable() -> bool
- return writable() and readable();
is_empty() -> bool
- checks if the directory is emptypurge() -> bool
(only for project) - removes the directory with the files insideclear() -> bool
(only for project) - clears files insideAll of these would possibly return something else than bool
for better error handling, especialy purge()
and clear()
.
appendExtra(Data|Config)Directories
from sago007/PlatformFolders
*****:The project is licensed under EUPL 1.1