|
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 | |
| namespace | mx |
| The mxlib c++ namespace. | |
Functions | |
| bool | mx::ioutils::exists (const std::string &path) |
| Check if a path exists. | |
| int | mx::ioutils::createDirectories (const std::string &path) |
| Create a directory or directories. | |
| std::string | mx::ioutils::pathStem (const std::string &fname) |
| Get the stem of the filename. | |
| std::string | mx::ioutils::pathFilename (const std::string &fname) |
| Get the base filename. | |
| std::string | mx::ioutils::parentPath (const std::string &fname) |
| Get the parent path from a filename. | |
| template<class verboseT = verbose::vvv> | |
| error_t | mx::ioutils::getFileNames (std::vector< std::string > &fileNames, 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| off_t | mx::ioutils::fileSize (int fd) |
| Get the size in bytes of a file. | |
| off_t | mx::ioutils::fileSize (FILE *f) |
| Get the size in bytes of a file pointed to by a FILE pointer. | |