Skip to content
API Documentation
BastionGuard™
xfs_recovery.hpp
Go to the documentation of this file.
1#pragma once
2
3// xfs_recovery.hpp -- read-only XFS recovery (V4 + V5).
4//
5// This is the public interface. It mirrors Ext4Recovery / NtfsRecovery
6// shape so the dispatcher in filesystem_recovery.cpp can use it the same
7// way as the others.
8//
9// Implementation status (this build, session 1 of N):
10// * Superblock parsing : DONE
11// * AG header (AGF/AGI) parsing : DONE
12// * Inode B+tree iteration : NOT YET (session 2)
13// * Inode parsing (single extent) : NOT YET (session 3)
14// * Directory shortform : NOT YET (session 3)
15// * File export : NOT YET (session 3)
16//
17// In this session, recover() succeeds in opening the volume and validating
18// its geometry, then returns a clear "not yet implemented at this stage"
19// message so the user knows the FS was identified but extraction is on
20// the roadmap.
21
22#include "disk_reader.hpp"
23#include "models.hpp"
25
26#include <string>
27#include <vector>
28
30public:
31 explicit XfsRecovery(DiskReader& reader);
32
33 // The interface matches Ext4Recovery::recover.
34 bool recover(uint64_t volume_offset,
35 const std::string& output_dir,
36 std::vector<RecoveredFileRecord>& recovered,
37 std::vector<std::string>& logs,
38 std::string& error);
39
40private:
42};
bool recover(uint64_t volume_offset, const std::string &output_dir, std::vector< RecoveredFileRecord > &recovered, std::vector< std::string > &logs, std::string &error)
DiskReader & reader_
XfsRecovery(DiskReader &reader)