tmuxp.workspace.finders.find_workspace_file
- tmuxp.workspace.finders.find_workspace_file ( workspace_file: Str
Path , workspace_dir: StrPath | None = None, ) str -
Return the real config path or raise an exception.
Description#
If workspace file is directory, scan for .tmuxp.{yaml,yml,json} in directory. If one or more found, it will warn and pick the first.
If workspace file is ".", "./" or None, it will scan current directory.
If workspace file is has no path and only a filename, e.g. "my_workspace.yaml" it will search workspace dir.
If workspace file has no path and no extension, e.g. "my_workspace", it will scan for file name with yaml, yml and json. If multiple exist, it will warn and pick the first.
- Parameters
-
-
workspace_file(StrPath ) # – Workspace file, valid examples: - a file name, my_workspace.yaml - relative path, ../my_workspace.yaml or ../project - a period, . -
workspace_dir(StrPath | None) #
-
- Returns
-
str Resolved absolute path to workspace file.
- Raises
-
-
File
Not – If workspace file cannot be found.Found Error
-