Documentation
¶
Index ¶
- type Config
- type FileInfo
- type Tool
- func (t *Tool) Copy(src, dst string) error
- func (t *Tool) Delete(path string) error
- func (t *Tool) Edit(path string, startLine, endLine int, newContent string) error
- func (t *Tool) Exists(path string) (bool, error)
- func (t *Tool) ListDir(path string) ([]FileInfo, error)
- func (t *Tool) Mkdir(path string) error
- func (t *Tool) Read(path string) (string, error)
- func (t *Tool) ReadLines(path string, startLine, endLine int) (string, error)
- func (t *Tool) Write(path, content string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
MaxReadSize int64 // maximum file size to read
AllowedPaths []string // allowed base paths (empty = all)
BlockedPaths []string // paths that are always denied
}
Config holds filesystem tool configuration
type FileInfo ¶
type FileInfo struct {
Path string `json:"path"`
Name string `json:"name"`
Size int64 `json:"size"`
IsDir bool `json:"isDir"`
ModTime int64 `json:"modTime"`
Mode string `json:"mode"`
}
FileInfo represents file metadata
type Tool ¶
type Tool struct {
// contains filtered or unexported fields
}
Tool provides filesystem operations
Click to show internal directories.
Click to hide internal directories.