From 84feb3b29389aa11707226b84c3bbb0e87a6f84a Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Thu, 6 May 2021 15:45:04 +0200 Subject: [PATCH] os: add os.devNull MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Provides the platform-specific file path of the null device. PR-URL: https://github.com/nodejs/node/pull/38569 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott Reviewed-By: Darshan Sen Reviewed-By: Tobias Nießen --- doc/api/os.md | 12 ++++++++++++ lib/os.js | 7 +++++++ test/parallel/test-os.js | 7 +++++++ 3 files changed, 26 insertions(+) diff --git a/doc/api/os.md b/doc/api/os.md index 79622b33d3e860..ab39a81904149f 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` + + +* {string} + +The platform-specific file path of the null device. + +* `\\.\nul` on Windows +* `/dev/null` on POSIX + ## `os.endianness()`