Provides API endpoints related to file
Summary
Types
@type find_text_200_json_resp() :: %{ absolute_offset: integer(), line_number: integer(), lines: find_text_200_json_resp_lines(), path: find_text_200_json_resp_path(), submatches: [find_text_200_json_resp_submatches()] }
@type find_text_200_json_resp_lines() :: %{text: String.t()}
@type find_text_200_json_resp_path() :: %{text: String.t()}
@type find_text_200_json_resp_submatches() :: %{ end: integer(), match: find_text_200_json_resp_submatches_match(), start: integer() }
@type find_text_200_json_resp_submatches_match() :: %{text: String.t()}
Functions
@spec file_list(opts :: keyword()) :: {:ok, [OpenCode.Generated.FileNode.t()]} | :error
List files
List files and directories in a specified path.
Options
directoryworkspacepath
@spec file_read(opts :: keyword()) :: {:ok, OpenCode.Generated.FileContent.t()} | :error
Read file
Read the content of a specified file.
Options
directoryworkspacepath
Get file status
Get the git status of all files in the project.
Options
directoryworkspace
Find files
Search for files or directories by name or pattern in the project directory.
Options
directoryworkspacequerydirstypelimit
@spec find_symbols(opts :: keyword()) :: {:ok, [OpenCode.Generated.Symbol.t()]} | :error
Find symbols
Search for workspace symbols like functions, classes, and variables using LSP.
Options
directoryworkspacequery
@spec find_text(opts :: keyword()) :: {:ok, [find_text_200_json_resp()]} | :error
Find text
Search for text patterns across files in the project using ripgrep.
Options
directoryworkspacepattern