GeezerVison is showing github.com — fs: make process.binding('fs') internal · nodejs/node@dd0381f
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: lib/fs.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -41,7 +41,7 @@ const { | 41 | 41 |
| 42 | 42 | const pathModule = require('path'); | 43 | 43 | const { isArrayBufferView } = require('internal/util/types'); | 44 | | -const binding = process.binding('fs'); | | 44 | +const binding = internalBinding('fs'); | 45 | 45 | const { Buffer, kMaxLength } = require('buffer'); | 46 | 46 | const errors = require('internal/errors'); | 47 | 47 | const { | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/bootstrap/loaders.js +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 81 | 81 | 'constants', | 82 | 82 | 'contextify', | 83 | 83 | 'crypto', | | 84 | + 'fs', | 84 | 85 | 'fs_event_wrap', | 85 | 86 | 'http_parser', | 86 | 87 | 'icu', | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/fs/promises.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 7 | 7 | S_IFMT, | 8 | 8 | S_IFREG | 9 | 9 | } = internalBinding('constants').fs; | 10 | | -const binding = process.binding('fs'); | | 10 | +const binding = internalBinding('fs'); | 11 | 11 | const { Buffer, kMaxLength } = require('buffer'); | 12 | 12 | const { | 13 | 13 | ERR_FS_FILE_TOO_LARGE, | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/fs/read_file_context.js +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | 'use strict'; | 2 | 2 |
| 3 | 3 | const { Buffer } = require('buffer'); | 4 | | -const { FSReqCallback, close, read } = process.binding('fs'); | | 4 | + | | 5 | +const { FSReqCallback, close, read } = internalBinding('fs'); | 5 | 6 |
| 6 | 7 | const kReadFileBufferLength = 8 * 1024; | 7 | 8 |
| |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/fs/streams.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 3 | 3 | const { | 4 | 4 | FSReqCallback, | 5 | 5 | writeBuffers | 6 | | -} = process.binding('fs'); | | 6 | +} = internalBinding('fs'); | 7 | 7 | const { | 8 | 8 | ERR_INVALID_ARG_TYPE, | 9 | 9 | ERR_OUT_OF_RANGE | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/fs/watchers.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -4,7 +4,7 @@ const errors = require('internal/errors'); | 4 | 4 | const { | 5 | 5 | kFsStatsFieldsNumber, | 6 | 6 | StatWatcher: _StatWatcher | 7 | | -} = process.binding('fs'); | | 7 | +} = internalBinding('fs'); | 8 | 8 | const { FSEvent } = internalBinding('fs_event_wrap'); | 9 | 9 | const { UV_ENOSPC } = internalBinding('uv'); | 10 | 10 | const { EventEmitter } = require('events'); | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/http2/core.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -119,7 +119,7 @@ const { | 119 | 119 | } = require('internal/timers'); | 120 | 120 | const { isArrayBufferView } = require('internal/util/types'); | 121 | 121 |
| 122 | | -const { FileHandle } = process.binding('fs'); | | 122 | +const { FileHandle } = internalBinding('fs'); | 123 | 123 | const binding = internalBinding('http2'); | 124 | 124 | const { | 125 | 125 | ShutdownWrap, | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/modules/cjs/loader.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -33,7 +33,7 @@ const { URL } = require('url'); | 33 | 33 | const { | 34 | 34 | internalModuleReadJSON, | 35 | 35 | internalModuleStat | 36 | | -} = process.binding('fs'); | | 36 | +} = internalBinding('fs'); | 37 | 37 | const { safeGetenv } = internalBinding('util'); | 38 | 38 | const { | 39 | 39 | makeRequireFunction, | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/net.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | 'use strict'; | 2 | 2 |
| 3 | 3 | const Buffer = require('buffer').Buffer; | 4 | | -const { writeBuffer } = process.binding('fs'); | | 4 | +const { writeBuffer } = internalBinding('fs'); | 5 | 5 | const errors = require('internal/errors'); | 6 | 6 |
| 7 | 7 | // IPv4 Segment | |
Collapse file Copy file name to clipboardExpand all lines: src/node_file.cc +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -2236,4 +2236,4 @@ void Initialize(Local<Object> target, | 2236 | 2236 |
| 2237 | 2237 | } // end namespace node | 2238 | 2238 |
| 2239 | | -NODE_BUILTIN_MODULE_CONTEXT_AWARE(fs, node::fs::Initialize) | | 2239 | +NODE_MODULE_CONTEXT_AWARE_INTERNAL(fs, node::fs::Initialize) |
|