Skip to content
API Documentation
BastionGuard™
hfs_recovery.hpp
Go to the documentation of this file.
1// hfs_recovery.hpp -- HFS+ / HFSX read-only recovery.
2//
3// Public interface, mirroring XfsRecovery / Ext4Recovery / NtfsRecovery
4// shape. Implementation status (this build, session 1 of N):
5//
6// * Volume header parse (HFS+ + HFSX) : DONE
7// * B-tree node descriptor + header rec : DONE
8// * Unicode UTF-16BE -> UTF-8 + partial NFC : DONE
9// * Catalog B-tree walk : NOT YET (session 2)
10// * File extent reading + export : NOT YET (session 3)
11// * Extents Overflow file (>8 extents) : NOT YET (session 4)
12// * decmpfs decompression / hardlinks : NOT YET (session 5+)
13//
14// In this session, recover() opens the volume, validates its header,
15// emits diagnostic logs (variant, geometry, special files, journal
16// state, key-compare type), and then returns false with a clear
17// "session 1 of N" message.
18
19#pragma once
20
21#include "disk_reader.hpp"
22#include "models.hpp"
24
25#include <string>
26#include <vector>
27
29public:
30 explicit HfsRecovery(DiskReader& reader);
31
32 // Same shape as the other filesystem recovery classes.
33 bool recover(uint64_t volume_offset,
34 const std::string& output_dir,
35 std::vector<RecoveredFileRecord>& recovered,
36 std::vector<std::string>& logs,
37 std::string& error);
38
39private:
41};
HfsRecovery(DiskReader &reader)
DiskReader & reader_
bool recover(uint64_t volume_offset, const std::string &output_dir, std::vector< RecoveredFileRecord > &recovered, std::vector< std::string > &logs, std::string &error)