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

Method getMetadata

lib/vfs/machfs.cc:33–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31 }
32
33 std::map<std::string, std::string> getMetadata() override
34 {
35 HfsMount m(this);
36
37 hfsvolent ve;
38 if (hfs_vstat(_vol, &ve))
39 throw BadFilesystemException();
40
41 std::map<std::string, std::string> attributes;
42 attributes[VOLUME_NAME] = ve.name;
43 attributes[TOTAL_BLOCKS] = std::to_string(ve.totbytes / ve.alblocksz);
44 attributes[USED_BLOCKS] =
45 std::to_string((ve.totbytes - ve.freebytes) / ve.alblocksz);
46 attributes[BLOCK_SIZE] = std::to_string(ve.alblocksz);
47 return attributes;
48 }
49
50 FilesystemStatus check() override
51 {

Callers

nothing calls this directly

Calls 3

hfs_vstatFunction · 0.85
to_stringFunction · 0.85

Tested by

no test coverage detected