@@ -19,26 +19,26 @@ const regularFile = __filename;
19
19
fs . readFile ( blockedFile , common . expectsError ( {
20
20
code : 'ERR_ACCESS_DENIED' ,
21
21
permission : 'FileSystemRead' ,
22
- resource : path . toNamespacedPath ( blockedFile ) ,
22
+ // resource: path.toNamespacedPath(blockedFile),
23
23
} ) ) ;
24
24
fs . readFile ( bufferBlockedFile , common . expectsError ( {
25
25
code : 'ERR_ACCESS_DENIED' ,
26
26
permission : 'FileSystemRead' ,
27
- resource : path . toNamespacedPath ( blockedFile ) ,
27
+ // resource: path.toNamespacedPath(blockedFile),
28
28
} ) ) ;
29
29
assert . throws ( ( ) => {
30
30
fs . readFileSync ( blockedFile ) ;
31
31
} , common . expectsError ( {
32
32
code : 'ERR_ACCESS_DENIED' ,
33
33
permission : 'FileSystemRead' ,
34
- resource : path . toNamespacedPath ( blockedFile ) ,
34
+ // resource: path.toNamespacedPath(blockedFile),
35
35
} ) ) ;
36
36
assert . throws ( ( ) => {
37
37
fs . readFileSync ( blockedFileURL ) ;
38
38
} , common . expectsError ( {
39
39
code : 'ERR_ACCESS_DENIED' ,
40
40
permission : 'FileSystemRead' ,
41
- resource : path . toNamespacedPath ( blockedFile ) ,
41
+ // resource: path.toNamespacedPath(blockedFile),
42
42
} ) ) ;
43
43
}
44
44
@@ -52,7 +52,7 @@ const regularFile = __filename;
52
52
} , common . expectsError ( {
53
53
code : 'ERR_ACCESS_DENIED' ,
54
54
permission : 'FileSystemRead' ,
55
- resource : path . toNamespacedPath ( blockedFile ) ,
55
+ // resource: path.toNamespacedPath(blockedFile),
56
56
} ) ) . then ( common . mustCall ( ) ) ;
57
57
assert . rejects ( ( ) => {
58
58
return new Promise ( ( _resolve , reject ) => {
@@ -62,7 +62,7 @@ const regularFile = __filename;
62
62
} , common . expectsError ( {
63
63
code : 'ERR_ACCESS_DENIED' ,
64
64
permission : 'FileSystemRead' ,
65
- resource : path . toNamespacedPath ( blockedFile ) ,
65
+ // resource: path.toNamespacedPath(blockedFile),
66
66
} ) ) . then ( common . mustCall ( ) ) ;
67
67
68
68
assert . rejects ( ( ) => {
@@ -73,7 +73,7 @@ const regularFile = __filename;
73
73
} , common . expectsError ( {
74
74
code : 'ERR_ACCESS_DENIED' ,
75
75
permission : 'FileSystemRead' ,
76
- resource : path . toNamespacedPath ( blockedFile ) ,
76
+ // resource: path.toNamespacedPath(blockedFile),
77
77
} ) ) . then ( common . mustCall ( ) ) ;
78
78
}
79
79
@@ -82,31 +82,31 @@ const regularFile = __filename;
82
82
fs . stat ( blockedFile , common . expectsError ( {
83
83
code : 'ERR_ACCESS_DENIED' ,
84
84
permission : 'FileSystemRead' ,
85
- resource : path . toNamespacedPath ( blockedFile ) ,
85
+ // resource: path.toNamespacedPath(blockedFile),
86
86
} ) ) ;
87
87
fs . stat ( bufferBlockedFile , common . expectsError ( {
88
88
code : 'ERR_ACCESS_DENIED' ,
89
89
permission : 'FileSystemRead' ,
90
- resource : path . toNamespacedPath ( blockedFile ) ,
90
+ // resource: path.toNamespacedPath(blockedFile),
91
91
} ) ) ;
92
92
assert . throws ( ( ) => {
93
93
fs . statSync ( blockedFile ) ;
94
94
} , common . expectsError ( {
95
95
code : 'ERR_ACCESS_DENIED' ,
96
96
permission : 'FileSystemRead' ,
97
- resource : path . toNamespacedPath ( blockedFile ) ,
97
+ // resource: path.toNamespacedPath(blockedFile),
98
98
} ) ) ;
99
99
assert . throws ( ( ) => {
100
100
fs . statSync ( blockedFileURL ) ;
101
101
} , common . expectsError ( {
102
102
code : 'ERR_ACCESS_DENIED' ,
103
103
permission : 'FileSystemRead' ,
104
- resource : path . toNamespacedPath ( blockedFile ) ,
104
+ // resource: path.toNamespacedPath(blockedFile),
105
105
} ) ) ;
106
106
fs . stat ( path . join ( blockedFolder , 'anyfile' ) , common . expectsError ( {
107
107
code : 'ERR_ACCESS_DENIED' ,
108
108
permission : 'FileSystemRead' ,
109
- resource : path . toNamespacedPath ( path . join ( blockedFolder , 'anyfile' ) ) ,
109
+ // resource: path.toNamespacedPath(path.join(blockedFolder, 'anyfile')),
110
110
} ) ) ;
111
111
112
112
// doesNotThrow
@@ -120,26 +120,26 @@ const regularFile = __filename;
120
120
fs . access ( blockedFile , fs . constants . R_OK , common . expectsError ( {
121
121
code : 'ERR_ACCESS_DENIED' ,
122
122
permission : 'FileSystemRead' ,
123
- resource : path . toNamespacedPath ( blockedFile ) ,
123
+ // resource: path.toNamespacedPath(blockedFile),
124
124
} ) ) ;
125
125
fs . access ( bufferBlockedFile , fs . constants . R_OK , common . expectsError ( {
126
126
code : 'ERR_ACCESS_DENIED' ,
127
127
permission : 'FileSystemRead' ,
128
- resource : path . toNamespacedPath ( blockedFile ) ,
128
+ // resource: path.toNamespacedPath(blockedFile),
129
129
} ) ) ;
130
130
assert . throws ( ( ) => {
131
131
fs . accessSync ( blockedFileURL , fs . constants . R_OK ) ;
132
132
} , common . expectsError ( {
133
133
code : 'ERR_ACCESS_DENIED' ,
134
134
permission : 'FileSystemRead' ,
135
- resource : path . toNamespacedPath ( blockedFile ) ,
135
+ // resource: path.toNamespacedPath(blockedFile),
136
136
} ) ) ;
137
137
assert . throws ( ( ) => {
138
138
fs . accessSync ( path . join ( blockedFolder , 'anyfile' ) , fs . constants . R_OK ) ;
139
139
} , common . expectsError ( {
140
140
code : 'ERR_ACCESS_DENIED' ,
141
141
permission : 'FileSystemRead' ,
142
- resource : path . toNamespacedPath ( path . join ( blockedFolder , 'anyfile' ) ) ,
142
+ // resource: path.toNamespacedPath(path.join(blockedFolder, 'anyfile')),
143
143
} ) ) ;
144
144
145
145
// doesNotThrow
@@ -153,26 +153,26 @@ const regularFile = __filename;
153
153
fs . copyFile ( blockedFile , path . join ( blockedFolder , 'any-other-file' ) , common . expectsError ( {
154
154
code : 'ERR_ACCESS_DENIED' ,
155
155
permission : 'FileSystemRead' ,
156
- resource : path . toNamespacedPath ( blockedFile ) ,
156
+ // resource: path.toNamespacedPath(blockedFile),
157
157
} ) ) ;
158
158
fs . copyFile ( bufferBlockedFile , path . join ( blockedFolder , 'any-other-file' ) , common . expectsError ( {
159
159
code : 'ERR_ACCESS_DENIED' ,
160
160
permission : 'FileSystemRead' ,
161
- resource : path . toNamespacedPath ( blockedFile ) ,
161
+ // resource: path.toNamespacedPath(blockedFile),
162
162
} ) ) ;
163
163
assert . throws ( ( ) => {
164
164
fs . copyFileSync ( blockedFileURL , path . join ( blockedFolder , 'any-other-file' ) ) ;
165
165
} , common . expectsError ( {
166
166
code : 'ERR_ACCESS_DENIED' ,
167
167
permission : 'FileSystemRead' ,
168
- resource : path . toNamespacedPath ( blockedFile ) ,
168
+ // resource: path.toNamespacedPath(blockedFile),
169
169
} ) ) ;
170
170
assert . throws ( ( ) => {
171
171
fs . copyFileSync ( blockedFile , path . join ( __dirname , 'any-other-file' ) ) ;
172
172
} , common . expectsError ( {
173
173
code : 'ERR_ACCESS_DENIED' ,
174
174
permission : 'FileSystemRead' ,
175
- resource : path . toNamespacedPath ( blockedFile ) ,
175
+ // resource: path.toNamespacedPath(blockedFile),
176
176
} ) ) ;
177
177
}
178
178
@@ -183,28 +183,28 @@ const regularFile = __filename;
183
183
} , common . expectsError ( {
184
184
code : 'ERR_ACCESS_DENIED' ,
185
185
permission : 'FileSystemRead' ,
186
- resource : path . toNamespacedPath ( blockedFile ) ,
186
+ // resource: path.toNamespacedPath(blockedFile),
187
187
} ) ) ;
188
188
assert . throws ( ( ) => {
189
189
fs . cpSync ( bufferBlockedFile , path . join ( blockedFolder , 'any-other-file' ) ) ;
190
190
} , common . expectsError ( {
191
191
code : 'ERR_ACCESS_DENIED' ,
192
192
permission : 'FileSystemRead' ,
193
- resource : path . toNamespacedPath ( blockedFile ) ,
193
+ // resource: path.toNamespacedPath(blockedFile),
194
194
} ) ) ;
195
195
assert . throws ( ( ) => {
196
196
fs . cpSync ( blockedFileURL , path . join ( blockedFolder , 'any-other-file' ) ) ;
197
197
} , common . expectsError ( {
198
198
code : 'ERR_ACCESS_DENIED' ,
199
199
permission : 'FileSystemRead' ,
200
- resource : path . toNamespacedPath ( blockedFile ) ,
200
+ // resource: path.toNamespacedPath(blockedFile),
201
201
} ) ) ;
202
202
assert . throws ( ( ) => {
203
203
fs . cpSync ( blockedFile , path . join ( __dirname , 'any-other-file' ) ) ;
204
204
} , common . expectsError ( {
205
205
code : 'ERR_ACCESS_DENIED' ,
206
206
permission : 'FileSystemRead' ,
207
- resource : path . toNamespacedPath ( blockedFile ) ,
207
+ // resource: path.toNamespacedPath(blockedFile),
208
208
} ) ) ;
209
209
}
210
210
@@ -213,26 +213,26 @@ const regularFile = __filename;
213
213
fs . open ( blockedFile , 'r' , common . expectsError ( {
214
214
code : 'ERR_ACCESS_DENIED' ,
215
215
permission : 'FileSystemRead' ,
216
- resource : path . toNamespacedPath ( blockedFile ) ,
216
+ // resource: path.toNamespacedPath(blockedFile),
217
217
} ) ) ;
218
218
fs . open ( bufferBlockedFile , 'r' , common . expectsError ( {
219
219
code : 'ERR_ACCESS_DENIED' ,
220
220
permission : 'FileSystemRead' ,
221
- resource : path . toNamespacedPath ( blockedFile ) ,
221
+ // resource: path.toNamespacedPath(blockedFile),
222
222
} ) ) ;
223
223
assert . throws ( ( ) => {
224
224
fs . openSync ( blockedFileURL , 'r' ) ;
225
225
} , common . expectsError ( {
226
226
code : 'ERR_ACCESS_DENIED' ,
227
227
permission : 'FileSystemRead' ,
228
- resource : path . toNamespacedPath ( blockedFile ) ,
228
+ // resource: path.toNamespacedPath(blockedFile),
229
229
} ) ) ;
230
230
assert . throws ( ( ) => {
231
231
fs . openSync ( path . join ( blockedFolder , 'anyfile' ) , 'r' ) ;
232
232
} , common . expectsError ( {
233
233
code : 'ERR_ACCESS_DENIED' ,
234
234
permission : 'FileSystemRead' ,
235
- resource : path . toNamespacedPath ( path . join ( blockedFolder , 'anyfile' ) ) ,
235
+ // resource: path.toNamespacedPath(path.join(blockedFolder, 'anyfile')),
236
236
} ) ) ;
237
237
238
238
// doesNotThrow
@@ -259,14 +259,14 @@ const regularFile = __filename;
259
259
fs . opendir ( blockedFolder , common . expectsError ( {
260
260
code : 'ERR_ACCESS_DENIED' ,
261
261
permission : 'FileSystemRead' ,
262
- resource : path . toNamespacedPath ( blockedFolder ) ,
262
+ // resource: path.toNamespacedPath(blockedFolder),
263
263
} ) ) ;
264
264
assert . throws ( ( ) => {
265
265
fs . opendirSync ( blockedFolder ) ;
266
266
} , common . expectsError ( {
267
267
code : 'ERR_ACCESS_DENIED' ,
268
268
permission : 'FileSystemRead' ,
269
- resource : path . toNamespacedPath ( blockedFolder ) ,
269
+ // resource: path.toNamespacedPath(blockedFolder),
270
270
} ) ) ;
271
271
// doesNotThrow
272
272
fs . opendir ( allowedFolder , ( err , dir ) => {
@@ -280,26 +280,26 @@ const regularFile = __filename;
280
280
fs . readdir ( blockedFolder , common . expectsError ( {
281
281
code : 'ERR_ACCESS_DENIED' ,
282
282
permission : 'FileSystemRead' ,
283
- resource : path . toNamespacedPath ( blockedFolder ) ,
283
+ // resource: path.toNamespacedPath(blockedFolder),
284
284
} ) ) ;
285
285
assert . throws ( ( ) => {
286
286
fs . readdirSync ( blockedFolder , { recursive : true } ) ;
287
287
} , common . expectsError ( {
288
288
code : 'ERR_ACCESS_DENIED' ,
289
289
permission : 'FileSystemRead' ,
290
- resource : path . toNamespacedPath ( blockedFolder ) ,
290
+ // resource: path.toNamespacedPath(blockedFolder),
291
291
} ) ) ;
292
292
fs . readdir ( blockedFolder , { recursive : true } , common . expectsError ( {
293
293
code : 'ERR_ACCESS_DENIED' ,
294
294
permission : 'FileSystemRead' ,
295
- resource : path . toNamespacedPath ( blockedFolder ) ,
295
+ // resource: path.toNamespacedPath(blockedFolder),
296
296
} ) ) ;
297
297
assert . throws ( ( ) => {
298
298
fs . readdirSync ( blockedFolder ) ;
299
299
} , common . expectsError ( {
300
300
code : 'ERR_ACCESS_DENIED' ,
301
301
permission : 'FileSystemRead' ,
302
- resource : path . toNamespacedPath ( blockedFolder ) ,
302
+ // resource: path.toNamespacedPath(blockedFolder),
303
303
} ) ) ;
304
304
305
305
// doesNotThrow
@@ -315,14 +315,14 @@ const regularFile = __filename;
315
315
} , common . expectsError ( {
316
316
code : 'ERR_ACCESS_DENIED' ,
317
317
permission : 'FileSystemRead' ,
318
- resource : path . toNamespacedPath ( blockedFile ) ,
318
+ // resource: path.toNamespacedPath(blockedFile),
319
319
} ) ) ;
320
320
assert . throws ( ( ) => {
321
321
fs . watch ( blockedFileURL , ( ) => { } ) ;
322
322
} , common . expectsError ( {
323
323
code : 'ERR_ACCESS_DENIED' ,
324
324
permission : 'FileSystemRead' ,
325
- resource : path . toNamespacedPath ( blockedFile ) ,
325
+ // resource: path.toNamespacedPath(blockedFile),
326
326
} ) ) ;
327
327
328
328
// doesNotThrow
@@ -338,14 +338,14 @@ const regularFile = __filename;
338
338
} , common . expectsError ( {
339
339
code : 'ERR_ACCESS_DENIED' ,
340
340
permission : 'FileSystemRead' ,
341
- resource : path . toNamespacedPath ( blockedFile ) ,
341
+ // resource: path.toNamespacedPath(blockedFile),
342
342
} ) ) ;
343
343
assert . throws ( ( ) => {
344
344
fs . watchFile ( blockedFileURL , common . mustNotCall ( ) ) ;
345
345
} , common . expectsError ( {
346
346
code : 'ERR_ACCESS_DENIED' ,
347
347
permission : 'FileSystemRead' ,
348
- resource : path . toNamespacedPath ( blockedFile ) ,
348
+ // resource: path.toNamespacedPath(blockedFile),
349
349
} ) ) ;
350
350
}
351
351
@@ -354,26 +354,26 @@ const regularFile = __filename;
354
354
fs . rename ( blockedFile , 'newfile' , common . expectsError ( {
355
355
code : 'ERR_ACCESS_DENIED' ,
356
356
permission : 'FileSystemRead' ,
357
- resource : path . toNamespacedPath ( blockedFile ) ,
357
+ // resource: path.toNamespacedPath(blockedFile),
358
358
} ) ) ;
359
359
fs . rename ( bufferBlockedFile , 'newfile' , common . expectsError ( {
360
360
code : 'ERR_ACCESS_DENIED' ,
361
361
permission : 'FileSystemRead' ,
362
- resource : path . toNamespacedPath ( blockedFile ) ,
362
+ // resource: path.toNamespacedPath(blockedFile),
363
363
} ) ) ;
364
364
assert . throws ( ( ) => {
365
365
fs . renameSync ( blockedFile , 'newfile' ) ;
366
366
} , common . expectsError ( {
367
367
code : 'ERR_ACCESS_DENIED' ,
368
368
permission : 'FileSystemRead' ,
369
- resource : path . toNamespacedPath ( blockedFile ) ,
369
+ // resource: path.toNamespacedPath(blockedFile),
370
370
} ) ) ;
371
371
assert . throws ( ( ) => {
372
372
fs . renameSync ( blockedFileURL , 'newfile' ) ;
373
373
} , common . expectsError ( {
374
374
code : 'ERR_ACCESS_DENIED' ,
375
375
permission : 'FileSystemRead' ,
376
- resource : path . toNamespacedPath ( blockedFile ) ,
376
+ // resource: path.toNamespacedPath(blockedFile),
377
377
} ) ) ;
378
378
}
379
379
@@ -384,21 +384,21 @@ const regularFile = __filename;
384
384
} , common . expectsError ( {
385
385
code : 'ERR_ACCESS_DENIED' ,
386
386
permission : 'FileSystemRead' ,
387
- resource : path . toNamespacedPath ( blockedFile ) ,
387
+ // resource: path.toNamespacedPath(blockedFile),
388
388
} ) ) ;
389
389
assert . throws ( ( ) => {
390
390
fs . openAsBlob ( bufferBlockedFile ) ;
391
391
} , common . expectsError ( {
392
392
code : 'ERR_ACCESS_DENIED' ,
393
393
permission : 'FileSystemRead' ,
394
- resource : path . toNamespacedPath ( blockedFile ) ,
394
+ // resource: path.toNamespacedPath(blockedFile),
395
395
} ) ) ;
396
396
assert . throws ( ( ) => {
397
397
fs . openAsBlob ( blockedFileURL ) ;
398
398
} , common . expectsError ( {
399
399
code : 'ERR_ACCESS_DENIED' ,
400
400
permission : 'FileSystemRead' ,
401
- resource : path . toNamespacedPath ( blockedFile ) ,
401
+ // resource: path.toNamespacedPath(blockedFile),
402
402
} ) ) ;
403
403
}
404
404
@@ -416,7 +416,7 @@ const regularFile = __filename;
416
416
} , common . expectsError ( {
417
417
code : 'ERR_ACCESS_DENIED' ,
418
418
permission : 'FileSystemRead' ,
419
- resource : path . toNamespacedPath ( blockedFile ) ,
419
+ // resource: path.toNamespacedPath(blockedFile),
420
420
} ) ) ;
421
421
}
422
422
@@ -425,26 +425,26 @@ const regularFile = __filename;
425
425
fs . statfs ( blockedFile , common . expectsError ( {
426
426
code : 'ERR_ACCESS_DENIED' ,
427
427
permission : 'FileSystemRead' ,
428
- resource : path . toNamespacedPath ( blockedFile ) ,
428
+ // resource: path.toNamespacedPath(blockedFile),
429
429
} ) ) ;
430
430
fs . statfs ( bufferBlockedFile , common . expectsError ( {
431
431
code : 'ERR_ACCESS_DENIED' ,
432
432
permission : 'FileSystemRead' ,
433
- resource : path . toNamespacedPath ( blockedFile ) ,
433
+ // resource: path.toNamespacedPath(blockedFile),
434
434
} ) ) ;
435
435
assert . throws ( ( ) => {
436
436
fs . statfsSync ( blockedFile ) ;
437
437
} , common . expectsError ( {
438
438
code : 'ERR_ACCESS_DENIED' ,
439
439
permission : 'FileSystemRead' ,
440
- resource : path . toNamespacedPath ( blockedFile ) ,
440
+ // resource: path.toNamespacedPath(blockedFile),
441
441
} ) ) ;
442
442
assert . throws ( ( ) => {
443
443
fs . statfsSync ( blockedFileURL ) ;
444
444
} , common . expectsError ( {
445
445
code : 'ERR_ACCESS_DENIED' ,
446
446
permission : 'FileSystemRead' ,
447
- resource : path . toNamespacedPath ( blockedFile ) ,
447
+ // resource: path.toNamespacedPath(blockedFile),
448
448
} ) ) ;
449
449
}
450
450
@@ -455,7 +455,7 @@ const regularFile = __filename;
455
455
} , common . expectsError ( {
456
456
code : 'ERR_ACCESS_DENIED' ,
457
457
permission : 'FileSystemRead' ,
458
- resource : blockedFolder ,
458
+ // resource: blockedFolder,
459
459
} ) ) ;
460
460
}
461
461
0 commit comments