# LibTmux::Server.source-file

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** Raku
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-raku/blob/e76160bcce6e03976d49424da15b7c31afb2c68e/lib/LibTmux/Server.rakumod#L512
- **Page:** https://libtmux.org/en/raku/latest/reference/libtmux-server-source-file/

```
method source-file(Mu $path, Mu :$parse-only = False,
                   Cancellation :$cancel = Cancellation --> Result:D)
```

Source one literal local pathname; parse-only validates without running its commands.

Source one literal local pathname; parse-only validates without running its commands.

## Parameters

- `$path` (`Mu`)
- `$parse-only?` (`Mu`)
- `$cancel?` (`Cancellation`)

## tmux command

The tmux commands behind `source-file`.

- [`source-file`](/en/tmux/latest/manual/source-file/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_source_file_entry`](/en/tmux/latest/reference/c-variable-cmd_source_file_entry/) (attribute)
- [`cmd_source_file_exec`](/en/tmux/latest/reference/c-function-cmd-source-file-c-cmd_source_file_exec/) (function)

## In other ports

Load a tmux configuration file

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Server.source_file`](/en/py/latest/reference/libtmux-server-source_file/) (method) |
| Ruby | [`LibTmux::Server#source_file`](/en/ruby/latest/reference/libtmux-server-source_file/) (method) |
| Erlang | [`tmux_command:source_file/2`](/en/erlang/latest/reference/tmux_command-source_file-2/) (function). Builds a trusted command value. Execute it explicitly with `tmux_server:command/3`. |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`server.Server.sourceFile`](/en/ts/latest/reference/server-server-sourcefile/) (method) |
| Rust | [`server.Server.source_file`](/en/rs/latest/reference/server-server-source_file/) (method) |
| Go | [`tmux.Server.SourceFile`](/en/go/latest/reference/tmux-server-sourcefile/) (method) |
| Java | [`io.github.libtmux.Server.sourceFile`](/en/java/latest/reference/io-github-libtmux-server-server-sourcefile/) (method) |
| C# | [`LibTmux.Server.SourceFileAsync`](/en/csharp/latest/reference/libtmux-server-sourcefileasync/) (method) |
| C++ | [`libtmux::Server::source_file`](/en/cxx/latest/reference/libtmux-server-source_file/) (method) |
| Swift | [`Server.sourceFile(_:)`](/en/swift/latest/reference/server-sourcefile(_-)/) (method) |
| OCaml | No direct public OCaml equivalent is recorded for this operation. |
| Perl | No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands. |

No equivalent is recorded in Lua, PowerShell, Julia, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.
