56 void chdir(std::string_view newRootDir);
57 void mkdir(std::string_view newRootDir);
60 std::string
addItem(
const std::string& hostItemName,
Add add);
61 std::string
addFile(
const std::string& filename,
Add add);
62 std::string
addDir(std::string_view rootDirName,
Add add);
63 std::string
getItemFromDir(std::string_view rootDirName, std::string_view itemName);
64 void getDir(std::string_view rootDirName);
65 std::string
deleteItem(std::string_view itemName);
66 std::string
renameItem(std::string_view currentName, std::string_view newName);
81 void writeLogicalSector(
unsigned sector,
const SectorBuffer& buf);
82 void readLogicalSector (
unsigned sector,
SectorBuffer& buf);
84 [[nodiscard]]
unsigned clusterToSector(
FAT::Cluster cluster)
const;
85 [[nodiscard]]
FAT::Cluster sectorToCluster(
unsigned sector)
const;
90 [[nodiscard]]
unsigned countFreeClusters()
const;
91 [[nodiscard]]
unsigned findUsableIndexInSector(
unsigned sector);
92 [[nodiscard]]
unsigned getNextSector(
unsigned sector)
const;
93 [[nodiscard]]
unsigned appendClusterToSubdir(
unsigned sector);
94 [[nodiscard]] DirEntry addEntryToDir(
unsigned sector);
95 [[nodiscard]]
unsigned addSubdir(
const FAT::FileName& msxName,
96 uint16_t
t, uint16_t d,
unsigned sector);
97 void alterFileInDSK(
MSXDirEntry& msxDirEntry,
const std::string& hostName);
98 void deleteItem(std::string_view itemName,
unsigned sector);
99 std::string deleteEntry(
const FAT::FileName& msxName,
unsigned rootSector);
101 void deleteDirectory(
unsigned sector);
103 [[nodiscard]]
unsigned addSubdirToDSK(
zstring_view hostName,
105 [[nodiscard]] DirEntry findEntryInDir(
const FAT::FileName& msxName,
unsigned sector,
107 std::string addFileToDSK(
const std::string& fullHostName,
unsigned sector,
Add add);
108 std::string addOrCreateSubdir(
zstring_view hostDirName,
unsigned sector,
Add add);
109 std::string recurseDirFill(std::string_view dirName,
unsigned sector,
Add add);
110 void fileExtract(
const std::string& resultFile,
const MSXDirEntry& dirEntry);
111 void recurseDirExtract(std::string_view dirName,
unsigned sector);
112 std::string singleItemExtract(std::string_view dirName, std::string_view itemName,
114 void chroot(std::string_view newRootDir,
bool createDir);
120 [[nodiscard]]
FAT::FileName hostToMSXFileName(std::string_view hostName)
const;
121 [[nodiscard]] std::string msxToHostFileName(
const FAT::FileName& msxName)
const;
128 unsigned clusterCount;
130 unsigned sectorsPerCluster;
131 unsigned sectorsPerFat;
133 unsigned rootDirStart;
135 unsigned chrootSector;
std::array< char, 8+3 > filename