# cmd_source_file_add

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

```c
static void cmd_source_file_add(struct cmd_source_file_data *cdata, const char *path)
```

## Parameters

- `cdata` (`struct cmd_source_file_data *`)
- `path` (`const char *`)

## Called by

- [`cmd_source_file_exec`](/en/tmux/3.2a/reference/c-function-cmd-source-file-c-cmd_source_file_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-source-file.c#L157)

## Calls

- [`log_debug`](/en/tmux/3.2a/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-source-file.c#L118)
- [`xreallocarray`](/en/tmux/3.2a/reference/c-function-xreallocarray/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-source-file.c#L119)
- [`xstrdup`](/en/tmux/3.2a/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-source-file.c#L121)

## Referenced declarations

- [`cmd_source_file_data`](/en/tmux/3.2a/reference/c-struct-cmd_source_file_data/) (struct)
- [`cmd_source_file_data.files`](/en/tmux/3.2a/reference/c-struct-cmd_source_file_data-files/) (attribute)
- [`cmd_source_file_data.nfiles`](/en/tmux/3.2a/reference/c-struct-cmd_source_file_data-nfiles/) (attribute)
