https://github.com/coderaiser/win32
Windows specific node functions
https://github.com/coderaiser/win32
cloudcmd javascript nodejs win32 windows
Last synced: 5 months ago
JSON representation
Windows specific node functions
- Host: GitHub
- URL: https://github.com/coderaiser/win32
- Owner: coderaiser
- License: mit
- Created: 2014-06-23T09:48:47.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2023-08-09T14:59:24.000Z (over 2 years ago)
- Last Synced: 2025-10-13T02:03:44.906Z (6 months ago)
- Topics: cloudcmd, javascript, nodejs, win32, windows
- Language: JavaScript
- Homepage:
- Size: 78.1 KB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog
- License: LICENSE
Awesome Lists containing this project
README
# win32
Win32 specific functions module for [Cloud Commander](https://cloudcmd.io).
## Install
```
npm install win32 --save
```
## Use
### read(path, options)
Read path and if it's root, return `volumes` on `win32`
### getVolumes()
Get volumes of Windows platform
```js
const win = require('win32');
const volumes = await win.getVolumes();
```
### unicodify()
Convert `cp437` (or other detected by `prepareCodePage`) to `utf8`;
```js
const win = require('win32');
const {exec} = require('child_process');
exec('dir')
.stdout
.pipe(win.unicodify())
.pipe(process.stdout);
```
### prepareCodePage()
Set code page to `65001` which is `utf8`. Will set back originial before exit.
```js
const win = require('win32');
win.prepareCodePage();
```
### isVolume(command)
Determines is `command` is volume:
```js
const win = require('win32');
win.isVolume('c:\\');
// returns on windows
true;
```
### isChangeVolume(command)
Determines is `command` is changing of `volume`:
```js
const win = require('win32');
win.isChangeVolume('c:');
// returns
true;
```
## License
MIT