mirror of
https://github.com/nodejs/node.git
synced 2025-05-01 17:03:34 +00:00

On Windows, most of the POSIX file mode definitions are not available. However, functionally equivalent read/write definitions exists, and chmod() can use them. This patch defines two aliases, so that these definintions are issued in fs.constants. fixes: https://github.com/nodejs/node/issues/41591 PR-URL: https://github.com/nodejs/node/pull/42757 Refs: https://github.com/nodejs/node/issues/41591 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
9 lines
283 B
JavaScript
9 lines
283 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const fs = require('fs');
|
|
const assert = require('assert');
|
|
|
|
// Check if the two constants accepted by chmod() on Windows are defined.
|
|
assert.notStrictEqual(fs.constants.S_IRUSR, undefined);
|
|
assert.notStrictEqual(fs.constants.S_IWUSR, undefined);
|