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

Function createDirent

tests/cpmfs.cc:87–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87static Bytes createDirent(const std::string& filename,
88 int extent,
89 int records,
90 const std::initializer_list<int> blocks,
91 int user = 0)
92{
93 Bytes dirent;
94 ByteWriter bw(dirent);
95 bw.write_8(user);
96 bw.append(filename);
97 while (bw.pos != 12)
98 bw.write_8(' ');
99
100 bw.write_8(extent & 0x1f);
101 bw.write_8(0);
102 bw.write_8(extent >> 5);
103 bw.write_8(records);
104
105 for (int block : blocks)
106 bw.write_8(block);
107 while (bw.pos != 32)
108 bw.write_8(0);
109
110 return dirent;
111}
112
113static void setBlock(
114 const std::shared_ptr<SectorInterface>& sectors, int block, Bytes data)

Callers 8

testPartialExtentFunction · 0.85
testLogicalExtentsFunction · 0.85
testBitmapFunction · 0.85
testPutGetFunction · 0.85
testPutBigFileFunction · 0.85
testDeleteFunction · 0.85
testMoveFunction · 0.85
testPutMetadataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected