Skip to content

Commit 2b6784a

Browse files
committed
Add documentation for swap related functions
1 parent 047a7ca commit 2b6784a

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,14 +349,26 @@ Example:
349349

350350
posix.sethostname('beefheart');
351351

352+
## swap
353+
354+
### posix.swapon(path, swapflags)
355+
356+
Enable the swap device located at `path`. `swapflags` is an optional array of
357+
strings to define the flags of the swap device, being available `prefer` and
358+
`discard`.
359+
360+
### posix.swapoff(path)
361+
362+
Disable the swap device located at `path`.
363+
352364
## Credits
353365

354366
* Some of the documentation strings stolen from Linux man pages.
355367
* `posix.seteuid` etc. implementation is based on Node core project `SetUid`
356368
* Thank you for your contributions:
357369
Igor Pashev, Dan Bornstein, Jamie Paton, Nick Muerdter, Oskari Saarenmaa,
358370
Theo Schlossnagle, Alex Potsides, Robey Pointer, Stephen Sugden,
359-
Dave Longley
371+
Dave Longley, Jesús Leganés-Combarro
360372

361373
## LICENSE
362374

0 commit comments

Comments
 (0)