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"
34 absl::StatusOr<std::filesystem::path>
ValidatePath(
const std::string& path_str)
const;
57 std::string
FormatTimestamp(
const std::filesystem::file_time_type& time)
const;
69 std::string
GetName()
const override {
return "filesystem-list"; }
72 return "List files and directories in a given path";
76 return "filesystem-list --path <directory> [--recursive] [--format <json|text>]";
97 std::string
GetName()
const override {
return "filesystem-read"; }
100 return "Read the contents of a file";
104 return "filesystem-read --path <file> [--lines <count>] [--offset <start>] [--format <json|text>]";
119 bool IsTextFile(
const std::filesystem::path& path)
const;
131 std::string
GetName()
const override {
return "filesystem-exists"; }
134 return "Check if a file or directory exists";
138 return "filesystem-exists --path <file|directory> [--format <json|text>]";
160 std::string
GetName()
const override {
return "filesystem-info"; }
163 return "Get detailed information about a file or directory";
167 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.