Mercurial > code
view modules/fs/doc/mainpage.cpp @ 540:fd2ba28ac54b
Js: add dukx_(get|push)_object
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 08 Jun 2016 22:12:58 +0200 |
parents | d6dad57e9e6b |
children | f48bb09bccc7 |
line wrap: on
line source
/** * \mainpage * * Welcome to the fs library. * * ## Introduction * * Various free functions for filesystem operations. No dependencies. * * Including: * * - Directory manipulation, * - Basic path management (clean, baseName, dirName), * - Checking access to files, * - Convenient stat wrapper. * * ## Operating system support * * - Linux, * - All BSD variants, * - Windows (must link to shlwapi library). * * ## Installation * * Just copy the two files fs.hpp and fs.cpp and add them to your project. * * ## Overview * * ### Reading a directory * * ````cpp * #include <iostream> * * #include "fs.hpp" * * int main() * { * try { * for (const fs::Entry &e : fs::readdir("jokes")) * std::cout << "entry: " << e.name << std::endl; * } catch (const std::exception &error) { * std::cerr << error.what() << std::endl; * } * * return 0; * } * ```` * * ### Creating a directory * * ````cpp * #include <iostream> * * #include "fs.hpp" * * int main() * { * try { * fs::mkdir("tmp"); * } catch (const std::exception &error) { * std::cerr << error.what() << std::endl; * } * * return 0; * } * ```` */