mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
Declarations of utilities for working with files. More...
Declarations of utilities for working with files.
Definition in file fileUtils.hpp.
Go to the source code of this file.
Namespaces | |
mx | |
The mxlib c++ namespace. | |
Functions | |
int | mx::ioutils::createDirectories (const std::string &path) |
Create a directory or directories. More... | |
std::string | mx::ioutils::pathStem (const std::string &fname) |
Get the stem of the filename. More... | |
std::string | mx::ioutils::pathFilename (const std::string &fname) |
Get the base filename. More... | |
std::string | mx::ioutils::parentPath (const std::string &fname) |
Get the parent path from a filename. More... | |
std::vector< std::string > | mx::ioutils::getFileNames (const std::string &directory, const std::string &prefix, const std::string &substr, const std::string &extension) |
Get a list of file names from the specified directory, specifying a prefix, a substring to match, and an extension. More... | |
std::vector< std::string > | mx::ioutils::getFileNames (const std::string &directory, const std::string &extension) |
Get a list of file names from the specified directory, specifying the extension. More... | |
std::vector< std::string > | mx::ioutils::getFileNames (const std::string &directory) |
Get a list of file names from the specified directory. More... | |
std::string | mx::ioutils::fileNamePrependAppend (const std::string &fname, const std::string &prepend, const std::string &append) |
Prepend and/or append strings to a file name, leaving the directory and extension unaltered. More... | |
std::string | mx::ioutils::fileNameAppend (const std::string &fname, const std::string &append) |
Append a string to a file name, leaving the directory and extension unaltered. More... | |
std::string | mx::ioutils::fileNamePrepend (const std::string &fname, const std::string &prepend) |
Prepend strings to a file name, leaving the directory and extension unaltered. More... | |
std::string | mx::ioutils::getSequentialFilename (const std::string &basename, const std::string &extension="", const int startat=0, int ndigit=4) |
Get the next file in a numbered sequence. More... | |
off_t | mx::ioutils::fileSize (int fd) |
Get the size in bytes of a file. More... | |
off_t | mx::ioutils::fileSize (FILE *f) |
Get the size in bytes of a file pointed to by a FILE pointer. More... | |