# file_read_open

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/file.c#L730
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-file_read_open/

```c
void file_read_open(struct client_files *files, struct tmuxpeer *peer, struct imsg *imsg, int allow_streams, int close_received, client_file_cb cb, void *cbdata)
```

## Parameters

- `files` (`struct client_files *`)
- `peer` (`struct tmuxpeer *`)
- `imsg` (`struct imsg *`)
- `allow_streams` (`int`)
- `close_received` (`int`)
- `cb` (`client_file_cb`)
- `cbdata` (`void *`)

## Called by

- [`client_dispatch_wait`](/en/tmux/3.7c/reference/c-function-client-c-client_dispatch_wait/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/client.c#L698)

## Calls

- [`fatalx`](/en/tmux/3.7c/reference/c-function-fatalx/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/file.c#L743)
- [`file_create_with_peer`](/en/tmux/3.7c/reference/c-function-file_create_with_peer/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/file.c#L755)
- [`log_debug`](/en/tmux/3.7c/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/file.c#L748)
- [`proc_send`](/en/tmux/3.7c/reference/c-function-proc_send/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/file.c#L789)

## Other function references

- [`file_read_callback`](/en/tmux/3.7c/reference/c-function-file-c-file_read_callback/) (function)
- [`file_read_error_callback`](/en/tmux/3.7c/reference/c-function-file-c-file_read_error_callback/) (function)

## Referenced declarations

- [`client_file.cb`](/en/tmux/3.7c/reference/c-struct-client_file-cb/) (attribute)
- [`client_file_cb`](/en/tmux/3.7c/reference/c-typedef-client_file_cb/) (typealias)
- [`client_files`](/en/tmux/3.7c/reference/c-struct-client_files/) (struct)
- [`client_file.closed`](/en/tmux/3.7c/reference/c-struct-client_file-closed/) (attribute)
- [`client_file.error`](/en/tmux/3.7c/reference/c-struct-client_file-error/) (attribute)
- [`msg_read_done.error`](/en/tmux/3.7c/reference/c-struct-msg_read_done-error/) (attribute)
- [`client_file.event`](/en/tmux/3.7c/reference/c-struct-client_file-event/) (attribute)
- [`client_file.fd`](/en/tmux/3.7c/reference/c-struct-client_file-fd/) (attribute)
- [`msg_read_open.fd`](/en/tmux/3.7c/reference/c-struct-msg_read_open-fd/) (attribute)
- [`MSG_READ_DONE`](/en/tmux/3.7c/reference/c-enum-msgtype-msg_read_done/) (constant)
- [`client_file.path`](/en/tmux/3.7c/reference/c-struct-client_file-path/) (attribute)
- [`client_file.peer`](/en/tmux/3.7c/reference/c-struct-client_file-peer/) (attribute)
- [`client_file.stream`](/en/tmux/3.7c/reference/c-struct-client_file-stream/) (attribute)
- [`msg_read_done.stream`](/en/tmux/3.7c/reference/c-struct-msg_read_done-stream/) (attribute)
- [`msg_read_open.stream`](/en/tmux/3.7c/reference/c-struct-msg_read_open-stream/) (attribute)
- [`tmuxpeer`](/en/tmux/3.7c/reference/c-struct-tmuxpeer/) (struct)
