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

Function mainGetDiskInfo

src/fe-getdiskinfo.cc:20–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18static FlagGroup flags({&fileFlags});
19
20int mainGetDiskInfo(int argc, const char* argv[])
21{
22 if (argc == 1)
23 showProfiles("getdiskinfo", formats);
24 flags.parseFlagsWithConfigFiles(argc, argv, formats);
25
26 try
27 {
28 auto filesystem = Filesystem::createFilesystemFromConfig();
29 auto attributes = filesystem->getMetadata();
30
31 for (const auto& e : attributes)
32 fmt::print("{}={}\n", e.first, quote(e.second));
33 }
34 catch (const FilesystemException& e)
35 {
36 error("{}", e.message);
37 }
38
39 return 0;
40}

Callers

nothing calls this directly

Calls 6

showProfilesFunction · 0.85
printFunction · 0.85
quoteFunction · 0.85
errorFunction · 0.85
getMetadataMethod · 0.45

Tested by

no test coverage detected