25 #ifndef _FILESYSTEM_HPP_
26 #define _FILESYSTEM_HPP_
31 #include <boost/filesystem/operations.hpp>
32 #include <boost/filesystem/convenience.hpp>
33 #include <boost/filesystem/fstream.hpp>
34 #include <boost/version.hpp>
37 namespace bfs = boost::filesystem;
39 #ifndef BOOST_FILESYSTEM_VERSION
40 # if (BOOST_VERSION/100) >= 1046
41 # define BOOST_FILESYSTEM_VERSION 3
43 # define BOOST_FILESYSTEM_VERSION 2
45 #endif // BOOST_FILESYSTEM_VERSION
51 #if BOOST_FILESYSTEM_VERSION == 2
53 #define BFS_STRING(p) p
55 #define BFS_COMPLETE bfs::complete
58 #define BFS_STRING(p) (p).string()
60 #define BFS_COMPLETE complete
72 vector<bfs::path>& matchingPaths);
103 #endif // _FILESYSTEM_HPP_
PWIZ_API_DECL int expand_pathmask(const bfs::path &pathmask, vector< bfs::path > &matchingPaths)
expands (aka globs) a pathmask to zero or more matching paths and returns the number of matching path...
sizes are treated as multiples of 2; abbreviations are: GiB (Gibibyte), MiB (Mebibyte), KiB (Kibibyte), B (byte)
PWIZ_API_DECL std::string read_file_header(const std::string &filepath, size_t length=512)
sizes are treated as multiples of 10; abbreviations are: GB (Gigabyte), MB (Megabyte), KB (Kilobyte), B (byte)
PWIZ_API_DECL std::string abbreviate_byte_size(boost::uintmax_t byteSize, ByteSizeAbbreviation abbreviationType=ByteSizeAbbreviation_SI)
abbreviates a byte size (file or RAM) as a readable string, using the specified notation ...
sizes are treated as multiples of 2; abbreviations are: GB (Gigabyte), MB (Megabyte), KB (Kilobyte), B (byte)