# cmd_source_file_add

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-source-file.c#L136
- **Page:** https://libtmux.org/en/tmux/3.7c/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.7c/reference/c-function-cmd-source-file-c-cmd_source_file_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-source-file.c#L211)

## Calls

- [`log_debug`](/en/tmux/3.7c/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-source-file.c#L138)
- [`xreallocarray`](/en/tmux/3.7c/reference/c-function-xreallocarray/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-source-file.c#L139)
- [`xstrdup`](/en/tmux/3.7c/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-source-file.c#L141)

## Referenced declarations

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