Skip to content

pyio.append_path

Daniel Flassig edited this page Jul 7, 2026 · 2 revisions

Appends a relative path to an existing path handle for a directory and returns the resulting path handle.

pyio.append_path(path_handle, relative_path)
path_handle:append_path(relative_path)
Parameter Type Description
path_handle path handle The base directory.
relative_path string A relative path below the base directory. Both \ and / are accepted as separators and normalized to \.

The relative path must not use .. components (no upward traversal). They will trigger an error, as will invalid characters (on Windows: < > : " | ? * and control characters).

Return value

Type Description
path handle A new handle for the resolved path

Example:

local library = pyux.get_library_handle("library")
local door = pyio.append_path(library, "doors/standard.pyo")
pytha.import_pyo(door)

Remarks:

The operation works purely on the path text and does not check whether the target exists!

The function will raise an error if

  • a leading separator, a .. component, or an invalid character is found
  • the path handle is not traversible (not all path handles come with traversal access rights)

Version Support:

Minimum PYTHA Version: V26

See also:

pyio, Path Handles, pyio.list_folder, import_pyo

Clone this wiki locally