A collection of miscellaneous filesystem-type utilities. More...
#include <vul_file.h>
Static Public Member Functions | |
| static std::string | get_cwd () |
| Return current working directory. More... | |
| static bool | change_directory (char const *dirname) |
| change current working directory. More... | |
| static bool | change_directory (std::string const &dirname) |
| static bool | make_directory (char const *filename) |
| Make a writable directory. More... | |
| static bool | make_directory (std::string const &filename) |
| static bool | make_directory_path (char const *filename) |
| Make a writable directory, including any necessary parents. More... | |
| static bool | make_directory_path (std::string const &filename) |
| static bool | is_directory (char const *filename) |
| Return true iff filename is a directory. More... | |
| static bool | is_directory (const std::string &filename) |
| static std::string | expand_tilde (char const *filename) |
| Expand any leading ~ escapes in filename. More... | |
| static std::string | expand_tilde (std::string const &filename) |
| static bool | exists (char const *filename) |
| Return true iff filename exists. It may be any sort of file. More... | |
| static bool | exists (std::string const &filename) |
| static unsigned long | size (char const *filename) |
| Return size of vul_file. More... | |
| static unsigned long | size (std::string filename) |
| static std::string | dirname (char const *filename) |
| Return dirname. More... | |
| static std::string | dirname (std::string const &filename) |
| static std::string | extension (char const *filename) |
| Return extension (including the '. More... | |
| static std::string | extension (std::string const &filename) |
| static std::string | basename (char const *filename, char const *suffix=nullptr) |
| Return basename. More... | |
| static std::string | basename (std::string const &filename, char const *suffix=nullptr) |
| static std::string | strip_directory (char const *filename) |
| Strips away directory of the filename. More... | |
| static std::string | strip_directory (std::string const &filename) |
| static std::string | strip_extension (char const *filename) |
| Strips away extension of the filename. More... | |
| static std::string | strip_extension (std::string const &filename) |
| static bool | delete_file_glob (std::string const &file_glob) |
| Delete 1 or more files using the Local OS preferred globbing. More... | |
| static bool | delete_file_glob (char const *file_glob) |
| static std::time_t | time_modified (char const *filename) |
| static std::time_t | time_modified (std::string const &filename) |
A collection of miscellaneous filesystem-type utilities.
Definition at line 26 of file vul_file.h.
|
static |
|
inlinestatic |
Definition at line 97 of file vul_file.h.
|
static |
change current working directory.
Definition at line 41 of file vul_file.cxx.
|
inlinestatic |
Definition at line 33 of file vul_file.h.
|
static |
Delete 1 or more files using the Local OS preferred globbing.
E.g. delete_file_glob("*"); will delete all the files in the current directory on most operating systems.
E.g. delete_file_glob("*"); will delete all the files in the current directory on most operating systems. Takes Posix path separators i.e. '/'
Definition at line 221 of file vul_file.cxx.
|
inlinestatic |
Definition at line 116 of file vul_file.h.
|
static |
Return dirname.
Definition at line 124 of file vul_file.cxx.
|
inlinestatic |
Definition at line 84 of file vul_file.h.
|
static |
Return true iff filename exists. It may be any sort of file.
Definition at line 108 of file vul_file.cxx.
|
inlinestatic |
Definition at line 74 of file vul_file.h.
|
static |
Expand any leading ~ escapes in filename.
Definition at line 234 of file vul_file.cxx.
|
inlinestatic |
Definition at line 68 of file vul_file.h.
|
static |
|
inlinestatic |
Definition at line 90 of file vul_file.h.
|
static |
Return current working directory.
Definition at line 31 of file vul_file.cxx.
|
static |
Return true iff filename is a directory.
Definition at line 55 of file vul_file.cxx.
|
inlinestatic |
Definition at line 54 of file vul_file.h.
|
static |
Make a writable directory.
You might imagine mkdir would be a better name, and then you might imagine a world w/out ms.
Definition at line 46 of file vul_file.cxx.
|
inlinestatic |
Definition at line 41 of file vul_file.h.
|
static |
Make a writable directory, including any necessary parents.
Returns true if successful, or if the directory already exists.
Returns true if successful, or if the directory already exists. Implemented by calling itself recursively on the parent directory.
Definition at line 83 of file vul_file.cxx.
|
inlinestatic |
Definition at line 48 of file vul_file.h.
|
static |
Return size of vul_file.
Definition at line 99 of file vul_file.cxx.
|
inlinestatic |
Definition at line 80 of file vul_file.h.
|
static |
Strips away directory of the filename.
Definition at line 151 of file vul_file.cxx.
|
inlinestatic |
Definition at line 103 of file vul_file.h.
|
static |
Strips away extension of the filename.
Definition at line 166 of file vul_file.cxx.
|
inlinestatic |
Definition at line 108 of file vul_file.h.
|
static |
Definition at line 62 of file vul_file.cxx.
|
inlinestatic |
Definition at line 214 of file vul_file.h.
1.8.15