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

Method mount

lib/vfs/appledos.cc:130–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128
129private:
130 void mount()
131 {
132 _vtoc = getAppleSector(VTOC_BLOCK);
133 if ((_vtoc[0x27] != 122) || (_vtoc[0x36] != 0) || (_vtoc[0x37] != 1))
134 throw BadFilesystemException();
135
136 _dirents.clear();
137 int track = _vtoc[1];
138 int sector = _vtoc[2];
139 while (track)
140 {
141 Bytes dir = getAppleSector(track * 16 + sector);
142 ByteReader br(dir);
143 br.seek(0x0b);
144
145 while (!br.eof())
146 {
147 Bytes fde = br.read(0x23);
148 if ((fde[0] != 0) && (fde[0] != 255))
149 _dirents.push_back(std::make_shared<AppledosDirent>(fde));
150 }
151
152 track = dir[1];
153 sector = dir[2];
154 }
155 }
156
157 std::shared_ptr<AppledosDirent> find(const std::string filename)
158 {

Callers

nothing calls this directly

Calls 6

clearMethod · 0.45
seekMethod · 0.45
eofMethod · 0.45
readMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected