# Work with local files

Find and read files within the folders your installed file connector can access.

Use `computer-files` to locate a file on your computer, inspect its metadata, and read supported content. It uses the folders and operating-system access already granted to that connector.

## Find the available file methods

```sh
zortex actions --json '{"source":"computer-files"}'
```

The expected workflow is allowed-directory discovery, targeted search or listing, then a bounded content read. Common catalog names include `list_allowed_directories`, `search_files`, and `list_directory`; use the exact method names returned by your installed catalog.

Inspect the allowed-directory method before invoking it:

```sh
zortex actions --json '{"source":"computer-files","method":"<returned-allowed-directory-method>"}'
```

Then call it with the required fields. This template uses an empty parameter object only if that method requires no fields:

```sh
zortex action --json '{"name":"connector.invoke","params":{"source":"computer-files","method":"<returned-allowed-directory-method>","input":{"params":{}}}}'
```

The returned directories define where to search. A file elsewhere on the computer is not automatically accessible.

## Locate the file

Choose a relevant directory from the allowed-directory result. The following example uses the supported `list_directory` method. Inspect its current schema, then replace `<returned-allowed-directory>` with that actual path:

```sh
zortex actions --json '{"source":"computer-files","method":"list_directory"}'
zortex action --json '{"name":"connector.invoke","params":{"source":"computer-files","method":"list_directory","input":{"params":{"path":"<returned-allowed-directory>"}}}}'
```

The result identifies the files and subdirectories at that location. Choose the relevant text file, or list one returned subdirectory with the same method. If the file is not nearby, discover `search_files` and use its documented `path` and `pattern` fields for a targeted search. Do not recursively read every file to find one document.

Keep the actual returned path and metadata. If several files match, compare their directory, name, size, and available modification information. Ask for a choice only when the intended file cannot be resolved from the task and available evidence.

## Read enough content

For a text file, inspect `read_text_file`, then read its first 80 lines. Replace the path with the file selected from the listing:

```sh
zortex actions --json '{"source":"computer-files","method":"read_text_file"}'
zortex action --json '{"name":"connector.invoke","params":{"source":"computer-files","method":"read_text_file","input":{"params":{"path":"<selected-absolute-file-path>","head":80}}}}'
```

The result contains the requested text. This example reviews **up to the first 80 lines**, not the whole file. Use the current method's supported controls to read more when the task requires it. A successful listing establishes that the file exists; only a content read supports conclusions about what it says. If your installed catalog lacks either method, use the equivalent method and fields it actually exposes.

For a binary file or unsupported format, use an available format-specific reader or preserve the file for the intended destination. Do not treat a filename or metadata as a review of the document's contents. If the file exceeds a read bound, narrow the range or use the supported format rather than silently truncating a conclusion.

## Save or share the result

A read does not create a new file. To save your own notes or a derived output, use the writing capability of your terminal, editor, or agent host, then reopen the saved file to check it. Only use a connector write method if the current catalog exposes it and the task authorizes the change.

For a static copy sent through Vision's share service, follow [Save and share results](/docs/vision/tools/sharing). Its file selection requires the actual folder and file paths and an honest content-review status.

## Recover access

| Symptom | Next step |
| --- | --- |
| No file source or methods | Check that the file connector is installed and enabled. |
| Empty allowed-directory list | Complete that source's supported folder setup; do not assume the entire disk is allowed. |
| Permission denied | Check the selected root and required OS grant. Do not broaden access beyond the intended folder. |
| File disappeared or changed | Locate it again and reread the current version before using or sharing it. |
| Content cannot be extracted | Report what you could inspect and use a compatible reader if available. |

For agents, discover and invoke the same methods with `indra.actions` and `indra.action`. The agent should locate routine paths through the available tools instead of making the person repeat a path it can already discover.
