From da19e7d8c8ad80ee8f0fae604176b296a93a931a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Thu, 17 Oct 2013 14:55:14 +0200 Subject: [PATCH] makeDir() in run client. --- run.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/run.cpp b/run.cpp index cfda31a..ee2fd5c 100644 --- a/run.cpp +++ b/run.cpp @@ -40,6 +40,7 @@ int main(int argc, char *argv[]) { std::cout << " c ... create" << std::endl; std::cout << " z ... setSize" << std::endl; std::cout << " m ... setMode" << std::endl; + std::cout << " k ... makeDir" << std::endl; } if (argc >= 2) conf = argv[1]; @@ -214,6 +215,18 @@ int main(int argc, char *argv[]) { break; } + + case 'k': { + mode_t mode; + + operation = "make directory"; + + mode = 0755; + if (argc >= 5) mode = strtoull(arg.c_str(), NULL, 8); + catalog->makeDir(path, mode); + + break; + } } } catch (dmlite::DmException& e) { std::cout << "Could not " << operation << "." << std::endl -- 1.8.2.3