Appends a path component to a path, handling trailing slashes correctly.
Port of appending_path_component() from lifehash.cpp lines 18-24.
appending_path_component()
The base path
The component to append
The combined path
appendingPathComponent("", "file.png") // => "file.png"appendingPathComponent("/tmp/", "file.png") // => "/tmp/file.png"appendingPathComponent("/tmp", "file.png") // => "/tmp/file.png" Copy
appendingPathComponent("", "file.png") // => "file.png"appendingPathComponent("/tmp/", "file.png") // => "/tmp/file.png"appendingPathComponent("/tmp", "file.png") // => "/tmp/file.png"
Appends a path component to a path, handling trailing slashes correctly.
Port of
appending_path_component()from lifehash.cpp lines 18-24.