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, OpenCode.Generated.BadRequestError.t()}
List files
List files and directories in a specified path.
Options
directoryworkspacepath
@spec file_read(opts :: keyword()) :: {:ok, OpenCode.Generated.FileContent.t()} | {:error, OpenCode.Generated.BadRequestError.t()}
Read file
Read the content of a specified file.
Options
directoryworkspacepath
@spec file_status(opts :: keyword()) :: {:ok, [t()]} | {:error, OpenCode.Generated.BadRequestError.t()}
Get file status
Get the git status of all files in the project.
Options
directoryworkspace
@spec find_files(opts :: keyword()) :: {:ok, [String.t()]} | {:error, OpenCode.Generated.BadRequestError.t()}
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, OpenCode.Generated.BadRequestError.t()}
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, OpenCode.Generated.BadRequestError.t()}
Find text
Search for text patterns across files in the project using ripgrep.
Options
directoryworkspacepattern