MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / mainMkDir

Function mainMkDir

src/fe-mkdir.cc:15–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13static StringFlag filename({"-p", "--path"}, "directory to create", "");
14
15int mainMkDir(int argc, const char* argv[])
16{
17 if (argc == 1)
18 showProfiles("mkdir", formats);
19 flags.parseFlagsWithConfigFiles(argc, argv, formats);
20
21 try
22 {
23 auto filesystem = Filesystem::createFilesystemFromConfig();
24
25 Path path(filename);
26 if (path.size() == 0)
27 error("filename missing");
28
29 filesystem->createDirectory(path);
30 filesystem->flushChanges();
31 }
32 catch (const FilesystemException& e)
33 {
34 error("{}", e.message);
35 }
36
37 return 0;
38}

Callers

nothing calls this directly

Calls 6

showProfilesFunction · 0.85
errorFunction · 0.85
sizeMethod · 0.45
createDirectoryMethod · 0.45
flushChangesMethod · 0.45

Tested by

no test coverage detected