https://github.com/mrmlnc/imdisk-wrapper
:package: ImDisk wrapper to create and delete virtual disks.
https://github.com/mrmlnc/imdisk-wrapper
Last synced: 9 months ago
JSON representation
:package: ImDisk wrapper to create and delete virtual disks.
- Host: GitHub
- URL: https://github.com/mrmlnc/imdisk-wrapper
- Owner: mrmlnc
- License: mit
- Created: 2015-10-11T10:44:17.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-05-04T17:26:44.000Z (about 9 years ago)
- Last Synced: 2025-01-31T10:35:24.025Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# imdisk-wrapper
> A simple wrapper for ImDisk to create (only VM) and delete virtual disks.
[](https://ci.appveyor.com/project/mrmlnc/imdisk-wrapper)
[](https://www.npmjs.com/package/imdisk-wrapper)
[](https://david-dm.org/mrmlnc/imdisk-wrapper#info=dependencies)
[](https://david-dm.org/mrmlnc/imdisk-wrapper#info=devDependencies)
## Install
```shell
$ npm i -S imdisk-wrapper
```
## Usage
### create(label, size, [options])
```js
imDisk.create('Z', '32M').then((res) => {
console.log(res); // { label: 'Z', size: '32M' }
}).catch((err) => {
console.log(err);
});
```
**arguments:**
* `label` [`string` | default: random available letter] - Available drive letter is determined by [windows-drive-letters](https://github.com/mrmlnc/windows-drive-letters).
* `size` [`string` | default: `null`] - The size of the disk in the format `number[b, k, m, g, t, K, M, G, T]`.
**options:**
* `imdiskPath` [`string` | default: `imdisk`] - A path to ImDisk.
* `fileSystem` [`string` | default: `ntfs`] - Disk file system.
* `command` [`string` | default: `null`] - Custom command that replaces the command of creating disk in this module.
### remove(label, [options])
```js
imDisk.create('Z').then((res) => {
console.log(res); // { label: 'Z' }
}).catch((err) => {
console.log(err);
});
```
**arguments:**
* `label` [`string` | default: `null`] - The drive letter to remove.
**options:**
* `imdiskPath` [`string` | default: `imdisk`] - A path to ImDisk.
* `force` [`boolean` | default: `false`] - Use `true` to force removal even if the device is in use.
* `command` [`string` | default: `null`] - Custom command that replaces the command of removing disk in this module.
## Changelog
See the [Releases section of our GitHub project](https://github.com/mrmlnc/imdisk-wrapper/releases) for changelogs for each release version.
## License
This software is released under the terms of the MIT license.