<commit_before># CzProject\PathHelper

Helper class for creating relative paths, absolutizing paths, ...

## Usage


``` php
use CzProject\PathHelper;
```

### Absolutize path

``` php
PathHelper::absolutizePath($path);

PathHelper::absolutizePath('path/to/my/../text/./file.txt');
```

Returns ```/path/to/text/file.txt```

You can use second parameter ```$prefix```:

``` php
PathHelper::absolutizePath('path/to/my/../text/./file.txt', NULL); // returns path/to/text/file.txt
PathHelper::absolutizePath('path/to/my/../text/./file.txt', '/file/root/'); // returns /file/root/path/to/text/file.txt
```


### Creating relative path

``` php<commit_msg>Readme: added Travis CI badge<commit_after># CzProject\PathHelper

[![Build Status](https://travis-ci.org/czproject/path-helper.svg?branch=master)](https://travis-ci.org/czproject/path-helper)

Helper class for creating relative paths, absolutizing paths, ...

## Usage


``` php
use CzProject\PathHelper;
```

### Absolutize path

``` php
PathHelper::absolutizePath($path);

PathHelper::absolutizePath('path/to/my/../text/./file.txt');
```

Returns ```/path/to/text/file.txt```

You can use second parameter ```$prefix```:

``` php
PathHelper::absolutizePath('path/to/my/../text/./file.txt', NULL); // returns path/to/text/file.txt
PathHelper::absolutizePath('path/to/my/../text/./file.txt', '/file/root/'); // returns /file/root/path/to/text/file.txt
```


### Creating relative path

``` php
{'fraction_non_alphanumeric': 0.2124567474048443, 'fraction_numerical': 0.0, 'mean_word_length': 4.37546468401487, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4567590', 'n_tokens_mistral': 526, 'n_tokens_neox': 509, 'n_words': 85}