From 7d4759bc3a691431bd40d475845c87344f06852d Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Thu, 6 May 2021 20:06:14 +0200 Subject: [PATCH] os: add os.devnull() Returns the platform-specific file path of the null device. --- doc/api/os.md | 12 ++++++++++++ doc/api/path.md | 12 ------------ lib/os.js | 9 +++++++++ lib/path.js | 2 -- test/parallel/test-os.js | 10 ++++++++++ test/parallel/test-path.js | 6 ------ 6 files changed, 31 insertions(+), 20 deletions(-) diff --git a/doc/api/os.md b/doc/api/os.md index f3d3f2d65249a4..b4fbde786fd2a6 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -122,6 +122,18 @@ The properties included on each object include: `nice` values are POSIX-only. On Windows, the `nice` values of all processors are always 0. +## `os.devnull()` + + +* Returns: {string} + +Returns the platform-specific file path of the null device: + +* `\\.\nul` on Windows +* `/dev/null` on POSIX + ## `os.endianness()` - -* {string} - -Provides the platform-specific file path of the null device: - -* `\\.\nul` on Windows -* `/dev/null` on POSIX - ## `path.dirname(path)`