1#ifndef FILEMANIPULATOR_HH
2#define FILEMANIPULATOR_HH
12class CommandController;
14class SectorAccessibleDisk;
34 std::string getWorkingDir(
unsigned p);
35 void setWorkingDir(
unsigned p, std::string_view dir);
38 std::string driveName;
42 std::vector<std::string> workingDir;
44 using Drives = std::vector<DriveSettings>;
48 void execute(std::span<const TclObject> tokens,
TclObject& result)
override;
49 [[nodiscard]] std::string help(std::span<const TclObject> tokens)
const override;
50 void tabCompletion(std::vector<std::string>& tokens)
const override;
52 [[nodiscard]] std::string getMachinePrefix()
const;
54 [[nodiscard]] Drives::iterator findDriveSettings(
DiskContainer& drive);
55 [[nodiscard]] Drives::iterator findDriveSettings(std::string_view driveName);
56 [[nodiscard]] DriveSettings& getDriveSettings(std::string_view diskName);
58 const DriveSettings& driveData);
60 DriveSettings& driveData);
62 void create(std::span<const TclObject> tokens);
63 void partition(std::span<const TclObject> tokens);
64 void savedsk(
const DriveSettings& driveData, std::string filename);
65 void format(std::span<const TclObject> tokens);
66 std::string chdir(DriveSettings& driveData, std::string_view filename);
67 void mkdir(DriveSettings& driveData, std::string_view filename);
68 [[nodiscard]] std::string dir(DriveSettings& driveData);
69 std::string
import(DriveSettings& driveData,
70 std::span<const TclObject> lists);
71 void exprt(DriveSettings& driveData, std::string_view dirname,
72 std::span<const TclObject> lists);
void unregisterDrive(DiskContainer &drive)
DiskManipulator(CommandController &commandController, Reactor &reactor)
void registerDrive(DiskContainer &drive, std::string_view prefix)
Contains the main loop of openMSX.
unsigned partition(SectorAccessibleDisk &disk, std::span< const unsigned > sizes, MSXBootSectorType bootType)
Write a partition table to the given disk and format each partition.
This file implemented 3 utility functions: