FileWriteTools

All file modifications must go through this interface.

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val root: String

Root on host machine

Link copied to clipboard
open override val toolCallbacks: List<<Error class: unknown class>>

Tool callbacks referenced or exposed.

Functions

Link copied to clipboard
open fun appendFile(path: String, content: String): String
Link copied to clipboard
open fun appendToFile(path: String, content: String, createIfNotExists: Boolean)

Append content to a file, creating it if it doesn't exist. If create is true, the file will be created if it doesn't exist. If createIfNotExists is false, an exception will be thrown if the file doesn't exist.

Link copied to clipboard

Expose the ToolGroup as an interface

Link copied to clipboard
open fun createDirectory(path: String): String
Link copied to clipboard
open fun createFile(path: String, content: String): String

Create a file at the relative path under the root

open fun createFile(path: String, content: String, overwrite: Boolean): Path

Create a file with the given content.

Link copied to clipboard
open fun delete(path: String): String
Link copied to clipboard
open fun editFile(path: String, oldContent: String, newContent: String): String
Link copied to clipboard
abstract fun flushChanges()
Link copied to clipboard
Link copied to clipboard
open override fun getPathsAccessed(): List<String>
Link copied to clipboard