2013-05-08 15:42:44 +03:00
|
|
|
#ifndef _library__directory__hpp__included__
|
|
|
|
#define _library__directory__hpp__included__
|
|
|
|
|
|
|
|
#include <set>
|
|
|
|
#include <string>
|
2013-12-30 22:57:22 +02:00
|
|
|
#include <cstdlib>
|
2013-05-08 15:42:44 +03:00
|
|
|
|
2014-05-15 17:47:11 +03:00
|
|
|
namespace directory
|
|
|
|
{
|
|
|
|
std::set<std::string> enumerate(const std::string& dir, const std::string& match);
|
|
|
|
std::string absolute_path(const std::string& relative);
|
|
|
|
uintmax_t size(const std::string& path);
|
|
|
|
time_t mtime(const std::string& path);
|
|
|
|
bool exists(const std::string& filename);
|
|
|
|
bool is_regular(const std::string& filename);
|
|
|
|
bool is_directory(const std::string& filename);
|
|
|
|
bool ensure_exists(const std::string& path);
|
2014-05-15 17:54:54 +03:00
|
|
|
int rename_overwrite(const char* oldname, const char* newname);
|
2014-05-15 17:47:11 +03:00
|
|
|
}
|
2013-05-08 15:42:44 +03:00
|
|
|
|
|
|
|
#endif
|