# file_create_with_client

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/file.c#L97
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-file_create_with_client/

```c
struct client_file * file_create_with_client(struct client *c, int stream, client_file_cb cb, void *cbdata)
```

## Parameters

- `c` (`struct client *`)
- `stream` (`int`)
- `cb` (`client_file_cb`)
- `cbdata` (`void *`)

## Called by

- [`file_error`](/en/tmux/3.2a/reference/c-function-file_error/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/file.c#L263)
- [`file_print_buffer`](/en/tmux/3.2a/reference/c-function-file_print_buffer/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/file.c#L233)
- [`file_read`](/en/tmux/3.2a/reference/c-function-file_read/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/file.c#L368)
- [`file_vprint`](/en/tmux/3.2a/reference/c-function-file_vprint/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/file.c#L206)
- [`file_write`](/en/tmux/3.2a/reference/c-function-file_write/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/file.c#L294)

## Calls

- [`fatalx`](/en/tmux/3.2a/reference/c-function-fatalx/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/file.c#L112)
- [`xcalloc`](/en/tmux/3.2a/reference/c-function-xcalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/file.c#L105)

## Referenced declarations

- [`client_file.buffer`](/en/tmux/3.2a/reference/c-struct-client_file-buffer/) (attribute)
- [`client_file.c`](/en/tmux/3.2a/reference/c-struct-client_file-c/) (attribute)
- [`client_file.cb`](/en/tmux/3.2a/reference/c-struct-client_file-cb/) (attribute)
- [`client`](/en/tmux/3.2a/reference/c-struct-client/) (struct)
- [`CLIENT_ATTACHED`](/en/tmux/3.2a/reference/c-define-tmux-h-client_attached/) (constant)
- [`client_file`](/en/tmux/3.2a/reference/c-struct-client_file/) (struct)
- [`client_file_cb`](/en/tmux/3.2a/reference/c-typedef-client_file_cb/) (typealias)
- [`client_file.data`](/en/tmux/3.2a/reference/c-struct-client_file-data/) (attribute)
- [`client.files`](/en/tmux/3.2a/reference/c-struct-client-files/) (attribute)
- [`client.flags`](/en/tmux/3.2a/reference/c-struct-client-flags/) (attribute)
- [`client_file.peer`](/en/tmux/3.2a/reference/c-struct-client_file-peer/) (attribute)
- [`client.peer`](/en/tmux/3.2a/reference/c-struct-client-peer/) (attribute)
- [`client_file.references`](/en/tmux/3.2a/reference/c-struct-client_file-references/) (attribute)
- [`client.references`](/en/tmux/3.2a/reference/c-struct-client-references/) (attribute)
- [`client_file.stream`](/en/tmux/3.2a/reference/c-struct-client_file-stream/) (attribute)
- [`client_file.tree`](/en/tmux/3.2a/reference/c-struct-client_file-tree/) (attribute)
