24 bool res1 =
MkdirDeep(cur_path.c_str(), mode);
27 int res = mkdir(cur_path.c_str(), mode);
28 assert(res == 0 || errno == EEXIST);
33 char dir_name_template[5];
34 snprintf(dir_name_template,
35 sizeof(dir_name_template),
42 for (
unsigned int i = 0;
46 snprintf(hex,
sizeof(hex), dir_name_template, i);
47 std::string this_path = cur_path +
"/" + std::string(hex);
48 int res = mkdir(this_path.c_str(), mode);
49 assert(res == 0 || errno == EEXIST);
struct cvmcache_context * ctx
assert((mem||(size==0))&&"Out Of Memory")
void InitializeDataDirectory(struct fs_traversal_context *ctx)
void PosixCheckDirStructure(std::string cur_path, mode_t mode, unsigned depth=1)
const unsigned kDigitsPerDirLevel
bool MkdirDeep(const std::string &path, const mode_t mode, bool verify_writable)
const unsigned kDirLevels
bool DirectoryExists(const std::string &path)