FatXplorer is a Python library for exploring FAT filesystems (FAT12/16/32). This guide shows how to extend FatXplorer’s codebase with a focused, practical example: adding recursive directory copy functionality (cp -r) and a plugin-style command to the CLI. You'll get design decisions, key code snippets, tests, and a usage example you can drop into the project.
Before diving into the "Extend Code," we must understand the tool. Developed by Eaton (FatXplorer Team), FatXplorer is a Windows-based application (compatible with Windows 7 through Windows 11) that provides low-level drivers to mount Xbox file systems as regular drive letters (e.g., E: or F:). fatxplorer extend code
Key features include:
But the crown jewel for high-capacity storage enthusiasts is the Extend Code. FatXplorer is a Python library for exploring FAT
The following is an example implementation of an extend code that creates a new file: But the crown jewel for high-capacity storage enthusiasts
#include "fatxplorer_api.h"
class CreateFileExtendCode : public FatxplorerExtendCode
public:
CreateFileExtendCode();
~CreateFileExtendCode();
void OnInit();
void OnCommand(int command);
;
CreateFileExtendCode::CreateFileExtendCode() {}
CreateFileExtendCode::~CreateFileExtendCode() {}
void CreateFileExtendCode::OnInit()
// Initialize the extend code
void CreateFileExtendCode::OnCommand(int command)
if (command == 1)
// Create a new file
FatxplorerFile file;
file.Create("example.txt", FatxplorerFile::TypeFile);
int main()
// Register the extend code
FatxplorerRegisterExtendCode(new CreateFileExtendCode());
return 0;