Pike v8.1 release 6

Method Stdio.append_path_nt()


Method append_path_nt

string append_path(string absolute, string ... relative)
string append_path_unix(string absolute, string ... relative)
string append_path_nt(string absolute, string ... relative)

Description

Append relative paths to an absolute path and remove any "//", "../" or "/." to produce a straightforward absolute path as a result.

"../" is ignorded in the relative paths if it makes the created path begin with something else than the absolute path (or so far created path).

append_path_nt() fixes drive letter issues in relative by removing the colon separator ":" if it exists (k:/fnord appends as k/fnord)

append_path_nt() also makes sure that UNC path(s) in relative is appended correctly by removing any "\\" or "//" from the beginning.

append_path() is equivalent to append_path_unix() on UNIX-like operating systems, and equivalent to append_path_nt() on NT-like operating systems.

See also

combine_path()