TeenyPath is a small (single file) cross-platform (Windows, Apple, Linux) filesystem abstraction for C++.
TeenyPath lets you avoid using a gigantic library (Boost, Qt, the not-fully-done filesystem.h in future C++ standards) to write cross-platform code which has to touch the filesystem.
using namespace TeenyPath;
const path cwd = current_path();
assert(cwd.is_directory());
assert(!cwd.is_symlink());
assert(!cwd.is_regular_file());
This section describes how to compile and link against TeenyPath.
To work with TeenyPath, you need the following:
- A C++ compiler (clang, gcc, msvc).
- A C++ linker (lld, ld, link.exe).
- CMake.
cmake -H. -B./build
cmake --build build
Add -I/path/to/teenypath.h
to your compilation command, and add -L/path/to/libteenypath.so
to your command line options for linking.
TeenyPath is made available AS-IS with no support. Any bugs that you discover should be filed in the TeenyPath issue tracker.
Code contributions and improvements by the community are welcomed! See the LICENSE file for current open-source licensing and use information.
Before we can accept pull requests from contributors, we require a signed Contributor License Agreement (CLA),