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

◆ mkdir()

void tfxx::fs::mkdir ( const std::string &  path)

create a directory

C++ interface to mkdir(2)

Definition at line 45 of file mkdir.cc.

Referenced by main(), and mkdirp().

46  {
47  int status;
48  status=::mkdir(path.c_str(),
49  S_IRUSR | S_IWUSR | S_IXUSR |
50  S_IRGRP | S_IWGRP | S_IXGRP |
51  S_IROTH | S_IWOTH | S_IXOTH);
52  int errsv=errno;
53  if (status != 0)
54  {
55  throw tfxx::error::FSException("mkdir() failed",
56  __FILE__, __LINE__, errsv);
57  }
58  }
exception class for file system utilities
Definition: fs.h:72
void mkdir(const std::string &path)
create a directory
Definition: mkdir.cc:45
Here is the caller graph for this function: