TF++, Miscellaneous classes and modules in C++:

◆ creatable()

bool tfxx::file::creatable ( const char *  path)

true if a file is creatable the function checks whether the directory is writable

true if a file is creatable the function checks whether the directory is writable.

Definition at line 56 of file filestatus.cc.

References tfxx::fs::dirname().

Referenced by testfile().

57  {
58  char *thepath=strdup(path);
59  std::string dir(dirname(thepath));
60  bool retval=(access(dir.c_str(), W_OK)==0);
61  free(thepath);
62  return(retval);
63  } // bool creatable(const char* path)
std::string dirname(const std::string &path)
return path with its last non-slash component removed
Definition: dirname.cc:45
Here is the call graph for this function:
Here is the caller graph for this function: