1#ifndef YAZE_SRC_CLI_SERVICE_AGENT_TOOLS_FILESYSTEM_TOOL_H_
2#define YAZE_SRC_CLI_SERVICE_AGENT_TOOLS_FILESYSTEM_TOOL_H_
7#include "absl/status/status.h"
8#include "absl/status/statusor.h"
36 absl::StatusOr<std::filesystem::path>
ValidatePath(
const std::string& path_str)
const;
59 std::string
FormatTimestamp(
const std::filesystem::file_time_type& time)
const;
71 std::string
GetName()
const override {
return "filesystem-list"; }
74 return "List files and directories in a given path";
78 return "filesystem-list --path <directory> [--recursive] [--format <json|text>]";
99 std::string
GetName()
const override {
return "filesystem-read"; }
102 return "Read the contents of a file";
106 return "filesystem-read --path <file> [--lines <count>] [--offset <start>] [--format <json|text>]";
121 bool IsTextFile(
const std::filesystem::path& path)
const;
133 std::string
GetName()
const override {
return "filesystem-exists"; }
136 return "Check if a file or directory exists";
140 return "filesystem-exists --path <file|directory> [--format <json|text>]";
162 std::string
GetName()
const override {
return "filesystem-info"; }
165 return "Get detailed information about a file or directory";
169 return "filesystem-info --path <file|directory> [--format <json|text>]";
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Utility for parsing common CLI argument patterns.
Base class for CLI command handlers.