<commit_before># Description
`file-assistant` is a module that creates, copies or moves the folders and files into the specified path or modifies the files' content according to the given [Array] `structure object` *(or `.json` file path)* instructions.

* Any bugs found? Give me to know on <EMAIL> or on [Github](https://github.com/devrafalko/file-assistant/issues)

## The Idea
* Create the [abstract `structure object`](#structure-object) of the folders and files, that you want to create or use to modify the existing folders and files structure.
* Pass your `structure object` as the [argument](#fileassistantrootstructuredoneeach) through `file-assistant` function
* It will execute all the instructions *(create, copy, move, remove, merge, modify, overwrite files and folders and overwrite or append content to the files)*.

## Features
```javascript
const fileAssistant = require('file-assistant');
```
The `fileAssistant` contains 3 methods:
* `fileAssistant` to handle the folders and files due to the `structure object` [\[see below\]](#fileassistantrootstructuredoneeach)
* `fileAssistant.structurize` to automatically generate the `structure object` for the elements of the given folder path [\[see below\]](#fileassistantstructurizepathjsoncallback)
* `fileAssistant.compare` to compare the differences between two folders *(which elements are **extraneous**, **missing** and already **existing**)* [\[see below\]](#fileassistantcomparemodelcomparedconfigcallback)



## List of contents:
1. [Common tips](#omg-list)
2. [Installation](#installation)
3. [Tests](#tests)
4. [Usage](#usage)
5. Parameters<commit_msg>The ensureDir method mentioned in the 'readme.md' list of the file-assistant available methods.<commit_after># Description
`file-assistant` is a module that creates, copies or moves the folders and files into the specified path or modifies the files' content according to the given [Array] `structure object` *(or `.json` file path)* instructions.

* Any bugs found? Give me to know on <EMAIL> or on [Github](https://github.com/devrafalko/file-assistant/issues)

## The Idea
* Create the [abstract `structure object`](#structure-object) of the folders and files, that you want to create or use to modify the existing folders and files structure.
* Pass your `structure object` as the [argument](#fileassistantrootstructuredoneeach) through `file-assistant` function
* It will execute all the instructions *(create, copy, move, remove, merge, modify, overwrite files and folders and overwrite or append content to the files)*.

## Features
```javascript
const fileAssistant = require('file-assistant');
```
The `fileAssistant` contains 4 methods:
* `fileAssistant` to handle the folders and files due to the `structure object` [\[see below\]](#fileassistantrootstructuredoneeach)
* `fileAssistant.structurize` to automatically generate the `structure object` for the elements of the given folder path [\[see below\]](#fileassistantstructurizepathjsoncallback)
* `fileAssistant.compare` to compare the differences between two folders *(which elements are **extraneous**, **missing** and already **existing**)* [\[see below\]](#fileassistantcomparemodelcomparedconfigcallback)
* `fileAssistant.ensureDir` to create the folders chain recursively [\[see below\]](#fileassistantensuredirpathcallback)


## List of contents:
1. [Common tips](#omg-list)
2. [Installation](#installation)
3. [Tests](#tests)
4. [Usage](#usage)
5. Parameters
{'fraction_non_alphanumeric': 0.10873337189126663, 'fraction_numerical': 0.003470213996529786, 'mean_word_length': 6.146694214876033, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7090104', 'n_tokens_mistral': 941, 'n_tokens_neox': 893, 'n_words': 384}