<commit_before>Filendir
========

A nodejs module: Write a file and create the directories found in its path if needed.
<commit_msg>Add description of the module<commit_after>Filendir
========
Write a file given a full path. Create the directories if necessary.

It is based on mkdirp. (https://www.npmjs.org/package/mkdirp)


API
----
Filendir exposes an asynchronous and a synchronous write method. It also exposes mkdirp if you need it.


### filendir.ws
### filendir.writeFileSynch

**Synchronous write **

@return: true or false depending on success.

**Example**

```javascript
var path = require('path')
var filendir = require('filendir')
var filename = path.join('let','s', 'nest','some','directories','myfile.txt')
var content = 'Hello World'

if (filendir.ws(filename, content)) {
    console.log('File written!')
}
```


### filendir.wa
### filendir.writeFileAsynch

**Asynchronous write **

**Example**

```javascript
var path = require('path')
var filendir = require('filendir')
var filename = path.join('let','s', 'nest','some','directories','myfile.txt')
var content = 'Hello World'

filendir.wa(filename, content, function (err) {
    if (!err) {
        console.log('File written!')
    }
})
```

###filendir.mkdirp
Would have been harder to do this without it.

See https://www.npmjs.org/package/mkdirp 

{'fraction_non_alphanumeric': 0.1550680786686838, 'fraction_numerical': 0.0, 'mean_word_length': 4.6781115879828326, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '1478403', 'n_tokens_mistral': 441, 'n_tokens_neox': 415, 'n_words': 130}