<commit_before>                      __                             ___ 
                     /\ \                          /'___\
      ___     ___    \_\ \     __           ____  /\ \__/  ____
    /' _ `\  / __`\  /'_` \  /'__`\ _______/\_ ,`\\ \ ,__\/',__\
    /\ \/\ \/\ \L\ \/\ \L\ \/\  __//\______\/_/  /_\ \ \_/\__, `\
    \ \_\ \_\ \____/\ \___,_\ \____\/______/ /\____\\ \_\\/\____/
     \/_/\/_/\/___/  \/__,_ /\/____/         \/____/ \/_/ \/___/

[![Build Status](https://secure.travis-ci.org/calmh/node-zfs.png)](http://travis-ci.org/calmh/node-zfs)

node-zfs
========

node-zfs is a simple wrapper around the `zfs` and `zpool` commands. It enables
ZFS management scripting using Node.js under SmartOS, Solaris, OpenIndiana and
FreeBSD. Node-zfs is also tested successfully on Ubuntu.

# Installation

Using npm: 

```
$ npm install --save zfs
```
# Usage

```
var zfs-filesystem = require('zfs');
```

##Now you can address the zfs library as follows:

### To use the zfs command implementation:
```
zfs-filesystem.zfs.
```
###To use the zpool implementation:

```
zfs-filesystem.zpool.
```

## Implemented commands for the ZFS tool

###ZFS list

The list command lists a specific zfs dataset or all datasets. All possible options can be found inside the lib/zfs.js file.

```
zfs-filesystem.zfs.list(function (err, list) {
    console.log(list)
});
```

###ZFS get

Get the parameters of a specific dataset or all datasets. All possible options can be found inside the lib/zfs.js file.

```js
var opts = {
    name: 'my-dataset-name',
    property: 'quota'
};

zfs-filesystem.zfs.get(opts, function (err, options) {
    console.log(options);
});
```

###ZFS set

Set a specific option for a given dataset. All possible options can be found inside the lib/zfs.js file.

```js
var opts = {
    name: 'my-dataset-name',
    property: 'quota',
    value: '1024G'
};

zfs-filesystem.zfs.set(opts, function (err, output) {
    console.log(output);
});
```

###ZFS Destroy

Remove a dataset from the ZFS filesystem

```js
var opts = {
    name: 'my-dataset-name'
};

zfs-filesystem.zfs.destroy(opts, function (err, output) {
    console.log(output);
});
```

###ZFS Create

Create a new dataset inside the ZFS filesystem. All possible options can be found inside the lib/zfs.js file.

```js
var opts = {
    name: 'my-new-dataset-name'
};

zfs-filesystem.zfs.create(opts, function (err, output) {
    console.log(output);
});
```

###ZFS Snapshot

Creates a snapshot with the given name. All possible options can be found inside the lib/zfs.js file.

```js
var opts = {
    name: 'my-new-snapshot-name',
    dataset: 'my-dataset-name'
};

zfs-filesystem.zfs.snapshot(opts, function (err, output) {
    console.log(output);
});
```

###ZFS Clone

Creates a clone of the given snapshot. All possible options can be found inside the lib/zfs.js file.

```js
var opts = {
    snapshot: 'my-snapshot-name',
    dataset: 'my-mountpoint-name'
};

zfs-filesystem.zfs.clone(opts, function (err, output) {
    console.log(output);
});
```

### ZFS Send

Initiates a send of a given snapshot and returns a readable stream. All possible options can be found inside the lib/zfs.js file.

```js
var opts = {
    snapshot : '/pool/dataset@snapshot',
    verbose : true
};

zfs-filesystem.zfs.send(opts, function (err, sendStream) {
    sendStream.on('error', function (err) {
        console.error(err);
    });

    sendStream.on('verbose', function (data) {
        console.log(data);
    });

    sendStream.pipe(process.stdout).on('end', function () {
        console.log('done');
    });
});
```
<commit_msg>update README.md: add zfs mount cmd<commit_after>                      __                             ___ 
                     /\ \                          /'___\
      ___     ___    \_\ \     __           ____  /\ \__/  ____
    /' _ `\  / __`\  /'_` \  /'__`\ _______/\_ ,`\\ \ ,__\/',__\
    /\ \/\ \/\ \L\ \/\ \L\ \/\  __//\______\/_/  /_\ \ \_/\__, `\
    \ \_\ \_\ \____/\ \___,_\ \____\/______/ /\____\\ \_\\/\____/
     \/_/\/_/\/___/  \/__,_ /\/____/         \/____/ \/_/ \/___/

[![Build Status](https://secure.travis-ci.org/calmh/node-zfs.png)](http://travis-ci.org/calmh/node-zfs)

node-zfs
========

node-zfs is a simple wrapper around the `zfs` and `zpool` commands. It enables
ZFS management scripting using Node.js under SmartOS, Solaris, OpenIndiana and
FreeBSD. Node-zfs is also tested successfully on Ubuntu.

# Installation

Using npm: 

```
$ npm install --save zfs
```
# Usage

```
var zfs-filesystem = require('zfs');
```

##Now you can address the zfs library as follows:

### To use the zfs command implementation:
```
zfs-filesystem.zfs.
```
###To use the zpool implementation:

```
zfs-filesystem.zpool.
```

## Implemented commands for the ZFS tool

###ZFS list

The list command lists a specific zfs dataset or all datasets. All possible options can be found inside the lib/zfs.js file.

```
zfs-filesystem.zfs.list(function (err, list) {
    console.log(list)
});
```

###ZFS get

Get the parameters of a specific dataset or all datasets. All possible options can be found inside the lib/zfs.js file.

```js
var opts = {
    name: 'my-dataset-name',
    property: 'quota'
};

zfs-filesystem.zfs.get(opts, function (err, options) {
    console.log(options);
});
```

###ZFS set

Set a specific option for a given dataset. All possible options can be found inside the lib/zfs.js file.

```js
var opts = {
    name: 'my-dataset-name',
    property: 'quota',
    value: '1024G'
};

zfs-filesystem.zfs.set(opts, function (err, output) {
    console.log(output);
});
```

###ZFS Destroy

Remove a dataset from the ZFS filesystem

```js
var opts = {
    name: 'my-dataset-name'
};

zfs-filesystem.zfs.destroy(opts, function (err, output) {
    console.log(output);
});
```

###ZFS Create

Create a new dataset inside the ZFS filesystem. All possible options can be found inside the lib/zfs.js file.

```js
var opts = {
    name: 'my-new-dataset-name'
};

zfs-filesystem.zfs.create(opts, function (err, output) {
    console.log(output);
});
```

###ZFS Snapshot

Creates a snapshot with the given name. All possible options can be found inside the lib/zfs.js file.

```js
var opts = {
    name: 'my-new-snapshot-name',
    dataset: 'my-dataset-name'
};

zfs-filesystem.zfs.snapshot(opts, function (err, output) {
    console.log(output);
});
```

###ZFS Clone

Creates a clone of the given snapshot. All possible options can be found inside the lib/zfs.js file.

```js
var opts = {
    snapshot: 'my-snapshot-name',
    dataset: 'my-mountpoint-name'
};

zfs-filesystem.zfs.clone(opts, function (err, output) {
    console.log(output);
});
```


### ZFS Mount

Mount the filesystem with the specified name.

```js
var opts = {
    dataset: 'my-filesystem-name'
};

zfs-filesystem.zfs.mount(opts, function (err, output) {
    console.log(output);
});
```

### ZFS Send

Initiates a send of a given snapshot and returns a readable stream. All possible options can be found inside the lib/zfs.js file.

```js
var opts = {
    snapshot : '/pool/dataset@snapshot',
    verbose : true
};

zfs-filesystem.zfs.send(opts, function (err, sendStream) {
    sendStream.on('error', function (err) {
        console.error(err);
    });

    sendStream.on('verbose', function (data) {
        console.log(data);
    });

    sendStream.pipe(process.stdout).on('end', function () {
        console.log('done');
    });
});
```

{'fraction_non_alphanumeric': 0.16518817204301076, 'fraction_numerical': 0.001075268817204301, 'mean_word_length': 2.6103833090732653, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1101031', 'n_tokens_mistral': 2648, 'n_tokens_neox': 2537, 'n_words': 680}