src/Filesaver.js
function (options) {
	var x;
	options = options || {};
	// Store folders
	this.folders = options.folders || {};
	this.safenames = options.safenames || false;

	// check for existing folders
	for (x in this.folders) {
		if (!fs.existsSync( this.folders[x] )){
			// create folder if not exists
			mkdirp( this.folders[x] );
		}
	}
}
function (options) {
	var x;
	options = options || {};
	// Store folders
	this.folders = options.folders || {};
	this.safenames = options.safenames || false;

	// check for existing folders
	for (x in this.folders) {
		if (!fs.existsSync( this.folders[x] )){
			// create folder if not exists
			mkdirp( this.folders[x] );
		}
	}
}
function ( options ) { var x ; options = options || { } ; // Store folders this . folders = options . folders || { } ; this . safenames = options . safenames || false ; // check for existing folders for ( x in this . folders ) { if ( ! fs . existsSync ( this . folders [ x ] ) ) { // create folder if not exists mkdirp ( this . folders [ x ] ) ; } } }
Filesaver constructor.

Options:

- folders: *Object*		with folder routes
- safename: *Boolean*	use safe name for files

Example:

```js
var folders = {
images: './images',
books: './books'
}
var filesaver = new Filesaver({
folders: folders,
safenames: true
});
```

@param {Object} options folders and safenames
Filesaver constructor .