类 FileSystemTools
java.lang.Object
com.agentsflex.tool.commons.FileSystemTools
- 作者:
- Christian Tzolov, Michael Yang
-
嵌套类概要
嵌套类 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static FileSystemTools.Builderbuilder()private intcountOccurrences(String text, String substring) private StringgenerateEditSnippet(String fileContent, String newString) Generates a formatted snippet of the file showing context around the edited section.private StringreplaceAll(String text, String old_string, String new_string) private StringreplaceFirst(String text, String old_string, String new_string)
-
构造器详细资料
-
FileSystemTools
public FileSystemTools()
-
-
方法详细资料
-
read
-
write
-
edit
-
countOccurrences
-
replaceFirst
-
replaceAll
-
generateEditSnippet
Generates a formatted snippet of the file showing context around the edited section. Matches Claude Code's Edit tool output format with line numbers and arrow separator.- 参数:
fileContent- the complete file content after editingnewString- the new string that was inserted (used to find the edit location)- 返回:
- formatted snippet with line numbers
-
builder
-