Download the PHP package riimu/kit-pathjoin without Composer

On this page you can find all versions of the php package riimu/kit-pathjoin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package kit-pathjoin

Path joiner and normalizer

PathJoin is PHP library for normalizing and joining file system paths. The purpose of this library is to make easier to work with file system paths irregardless of the platform and the system directory separator.

The purpose of file path normalization is to provide a single 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.

The API documentation is available at: http://kit.riimu.net/api/pathjoin/

Travis Scrutinizer Scrutinizer Coverage Packagist

Requirements

Installation

Installation with Composer

The easiest way to install this library is to use Composer to handle your dependencies. In order to install this library via Composer, simply follow these two steps:

  1. Acquire the composer.phar by running the Composer Command-line installation in your project root.

  2. Once you have run the installation script, you should have the composer.phar file in you project root and you can run the following command:

After installing this library via Composer, you can load the library by including the vendor/autoload.php file that was generated by Composer during the installation.

Adding the library as a dependency

If you are already familiar with how to use Composer, you may alternatively add the library as a dependency by adding the following composer.json file to your project and running the composer install command:

Manual installation

If you do not wish to use Composer to load the library, you may also download the library manually by downloading the latest release and extracting the src folder to your project. You may then include the provided src/autoload.php file to load the library classes.

Usage

This library provides two convenient methods, Path::normalize() and Path::join(). Both of these methods work in a very similar fashion. The main difference is that while the join() method can accept multiple paths to join, the normalize() will only accept a single path. Both of the methods will return a normalized path as the result.

The following example will contain numerous different use cases of the library:

The Path::normalize() also accepts a second parameter $prependDrive that takes a boolean value and defaults to true. On Windows platforms, the drive letter is important part of the absolute path. Thus, when the parameter is set to true, the method will prepend the drive letter of the current working directory to absolute paths if the absolute path does not provide one itself.

The following example is true for Windows systems, if the working directory is located on the C: drive:

Credits

This library is Copyright (c) 2014-2017 Riikka Kalliomäki.

See LICENSE for license and copying information.


All versions of kit-pathjoin with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package riimu/kit-pathjoin contains the following files

Loading the files please wait ....