#include <FileUtils.h>
For most operations, this is just a simpler interface to the stat() system call.
Definition at line 32 of file FileUtils.h.
Static Public Member Functions | |
static bool | readable (const char *path, const char *log=0) |
static int | size (const char *path, const char *log=0) |
Return the size of the file or -1 on error. | |
static void | abspath (std::string *path) |
Make sure the given path is absolute, prepending the current directory if necessary. | |
static int | rm_all_from_dir (const char *path) |
Deletes all of the files from a given directory. |
bool oasys::FileUtils::readable | ( | const char * | path, | |
const char * | log = 0 | |||
) | [static] |
Definition at line 29 of file FileUtils.cc.
References errno, oasys::LOG_DEBUG, and oasys::logf().
Referenced by dtn::DTNServer::parse_conf_file().
int oasys::FileUtils::size | ( | const char * | path, | |
const char * | log = 0 | |||
) | [static] |
Return the size of the file or -1 on error.
Definition at line 57 of file FileUtils.cc.
References errno, oasys::LOG_DEBUG, and oasys::logf().
Referenced by oasys::MmapFile::map().
void oasys::FileUtils::abspath | ( | std::string * | path | ) | [static] |
Make sure the given path is absolute, prepending the current directory if necessary.
Definition at line 83 of file FileUtils.cc.
Referenced by oasys::FileSystemStore::init(), oasys::BerkeleyDBStore::init(), and dtn::DTNServer::tidy_dir().
int oasys::FileUtils::rm_all_from_dir | ( | const char * | path | ) | [static] |
Deletes all of the files from a given directory.
Definition at line 96 of file FileUtils.cc.
Referenced by oasys::FileSystemStore::del_table().