35 #define FILETEST_VERSION \ 36 "FILETEST V1.0 test file access functions" 40 #include <tfxx/commandline.h> 41 #include <tfxx/filestatus.h> 47 void applytest(
const bool& f,
const char* a,
const char* b)
49 cout <<
"The file " << a <<
" ";
50 if (!f) { cout <<
"NOT "; }
57 cout <<
"testing file " << s << endl;
63 cout <<
"a unique new filename would be " 69 int main(
int iargc,
char* argv[])
76 "usage: filetest" "\n" 77 " or: filetest --help|-h" "\n" 100 cerr << usage_text << endl;
110 cerr << usage_text << endl;
111 cerr << help_text << endl;
bool writable(const char *path)
bool regular(const char *path)
void testfile(const std::string &s)
bool creatable(const char *path)
bool optset(const int &iopt) const
true if option # iopt was set on commandline
std::string uniquenew(const char *path)
void applytest(const bool &f, const char *a, const char *b)
bool readable(const char *path)
char * next()
returns char-array of next commandline argument
Namespace containing all components of module commandline. ,.
bool extra() const
true if there are more commandline arguments
Evaluates commandline by calling long_getopt. ,You may instantiate a Commandline object by passing th...
bool exists(const char *path)
struct to define options ,This struct is used to define a list of options. An example is: ...
int main(int iargc, char *argv[])