php-kit-pathjoin

Cross-platform library for normalizing and joining file system paths
  http://kit.riimu.net/#pathjoin
  0
  no reviews



PathJoin is a PHP library to normalize and join file system paths. The purpose of this library is to make easier to work with file system paths regardless of the platform and the system directory separator.

The purpose of file path normalization is to provide a single and consistent file path representation. In other words, the normalization in this library will resolve “.” and “..” directory references and also condense multiple directory separators into one. This makes it much easier to avoid common problems when comparing paths against each other.

While PHP provides a built in function realpath(), it is not usable in every case since it works by using the file system. This library simply combines and normalizes the paths using string handling. There is no requirement for the files or directories to be readable or even exist.