#include "common/common.h"
#include <dirent.h>
#include <unistd.h>
#include <sys/errno.h>
#include <sys/file.h>
Go to the source code of this file.
Classes | |
class | smart_fd |
smart file descriptor -- only use this for low-level objects! You probably want to use nstream or iostreams instead. More... | |
class | smart_dir |
smart directory handle. More... | |
class | AdvisoryLock |
advisory locking object WARNING: has no effect in Windows More... | |
| |
#define | THROW_ERROR(error, args) |
throws a (hopefully) descriptive error based on errno passed in | |
const char * | GetExtension (const char *filename) throw () |
bool | hasExtension (const char *filename, const char *extension) throw () |
returns true if the given filename ends with the specified string (NOT case-sensitive) | |
void | GetFileRoot (const char *filename, std::string &file_root) |
void | GetParentDirectory (const char *filename, std::string &directory) throw () |
const char * | getTopDirectory (const char *filename, std::string &topDir) |
retrieves the highest known folder for the given file. | |
std::string | getPathRelativeTo (const char *startFilename, const char *relFilename) |
given a starting filename, and then a path relative to that, return the full path of the file. | |
void | appendPath (const char *parentDirectory, const char *nextPath, std::string &path) |
given a starting path (directory), append another piece of the path | |
const char * | GetFilename (const char *path) throw () |
void | getTempfile (const char *path, std::string &tempfile) throw () |
void | getUserHomePath (std::string &path) |
bool | ContainsWhitespace (const char *test) throw () |
bool | doesPathExist (const char *path) throw () |
void | createEmptyFileIfDoesNotExist (const char *path) throw () |
void | walkDirectoryTree (const char *rootDirectory, const char *matchExtension, VecString &paths) |
does a recursive directory walk, and returns all paths relative to root |