<commit_before>File Path Utility
=================

[![Build Status](https://travis-ci.org/webmozart/path-util.png?branch=master)](https://travis-ci.org/webmozart/path-util)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/webmozart/path-util/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/webmozart/path-util/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/webmozart/path-util/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/webmozart/path-util/?branch=master)
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/b8c658df-0cce-4566-bf55-75da109aa6d7/mini.png)](https://insight.sensiolabs.com/projects/b8c658df-0cce-4566-bf55-75da109aa6d7)
[![Latest Stable Version](https://poser.pugx.org/webmozart/path-util/v/stable.png)](https://packagist.org/packages/webmozart/path-util)
[![Total Downloads](https://poser.pugx.org/webmozart/path-util/downloads.png)](https://packagist.org/packages/webmozart/path-util)
[![Dependency Status](https://www.versioneye.com/php/webmozart:path-util/1.0.0/badge.png)](https://www.versioneye.com/php/webmozart:path-util/1.0.0)

Latest release: [1.0.0](https://packagist.org/packages/webmozart/path-util#1.0.0)

PHP >= 5.3.3

This package provides robust, cross-platform utility functions for normalizing,
comparing and modifying file paths:

```php
use Webmozart\PathUtil\Path;

echo Path::canonicalize('/var/www/vhost/webmozart/../config.ini');
// => /var/www/vhost/config.ini

echo Path::canonicalize('C:\Programs\Webmozart\..\config.ini');
// => C:/Programs/config.ini

$paths = array(
    '/var/www/vhosts/project/httpdocs/config/config.yml',
    '/var/www/vhosts/project/httpdocs/images/banana.gif',
    '/var/www/vhosts/project/httpdocs/uploads/../images/nicer-banana.gif',
);

Path::getLongestCommonBasePath($paths);
// => /var/www/vhosts/project/httpdocs
```

Authors
-------

* [<NAME>] a.k.a. [@webmozart]
* [The Community Contributors]

Installation
------------

The utility can be installed with [Composer]:

```
$ composer require webmozart/path-util:~1.0
```

Documentation
-------------

Read the [Documentation] if you want to learn more about the contained functions.

Contribute
----------

Contributions are always welcome!

* Report any bugs or issues you find on the [issue tracker].
* You can grab the source code at the [Git repository].

Support
-------

If you are having problems, send a mail to <EMAIL> or shout out to
[@webmozart] on Twitter.

License
-------

Puli and its documentation are licensed under the [MIT license].
<commit_msg>Fixed license reference in the README<commit_after>File Path Utility
=================

[![Build Status](https://travis-ci.org/webmozart/path-util.png?branch=master)](https://travis-ci.org/webmozart/path-util)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/webmozart/path-util/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/webmozart/path-util/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/webmozart/path-util/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/webmozart/path-util/?branch=master)
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/b8c658df-0cce-4566-bf55-75da109aa6d7/mini.png)](https://insight.sensiolabs.com/projects/b8c658df-0cce-4566-bf55-75da109aa6d7)
[![Latest Stable Version](https://poser.pugx.org/webmozart/path-util/v/stable.png)](https://packagist.org/packages/webmozart/path-util)
[![Total Downloads](https://poser.pugx.org/webmozart/path-util/downloads.png)](https://packagist.org/packages/webmozart/path-util)
[![Dependency Status](https://www.versioneye.com/php/webmozart:path-util/1.0.0/badge.png)](https://www.versioneye.com/php/webmozart:path-util/1.0.0)

Latest release: [1.0.0](https://packagist.org/packages/webmozart/path-util#1.0.0)

PHP >= 5.3.3

This package provides robust, cross-platform utility functions for normalizing,
comparing and modifying file paths:

```php
use Webmozart\PathUtil\Path;

echo Path::canonicalize('/var/www/vhost/webmozart/../config.ini');
// => /var/www/vhost/config.ini

echo Path::canonicalize('C:\Programs\Webmozart\..\config.ini');
// => C:/Programs/config.ini

$paths = array(
    '/var/www/vhosts/project/httpdocs/config/config.yml',
    '/var/www/vhosts/project/httpdocs/images/banana.gif',
    '/var/www/vhosts/project/httpdocs/uploads/../images/nicer-banana.gif',
);

Path::getLongestCommonBasePath($paths);
// => /var/www/vhosts/project/httpdocs
```

Authors
-------

* [<NAME>] a.k.a. [@webmozart]
* [The Community Contributors]

Installation
------------

The utility can be installed with [Composer]:

```
$ composer require webmozart/path-util:~1.0
```

Documentation
-------------

Read the [Documentation] if you want to learn more about the contained functions.

Contribute
----------

Contributions are always welcome!

* Report any bugs or issues you find on the [issue tracker].
* You can grab the source code at the [Git repository].

Support
-------

If you are having problems, send a mail to <EMAIL> or shout out to
[@webmozart] on Twitter.

License
-------

All contents of this package are licensed under the [MIT license].

{'fraction_non_alphanumeric': 0.190439176059075, 'fraction_numerical': 0.020598523124757094, 'mean_word_length': 4.333678756476684, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, 'https://': 30, 'lorem ipsum': 0, 'www.': 16, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6376424', 'n_tokens_mistral': 1927, 'n_tokens_neox': 1850, 'n_words': 286}