File tree 8 files changed +44
-0
lines changed
8 files changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -434,13 +434,19 @@ A [`TypeError`][] is thrown if `path` is not a string.
434
434
## ` path.posix `
435
435
<!-- YAML
436
436
added: v0.11.15
437
+ changes:
438
+ - version: REPLACEME
439
+ pr-url: https://github.com/nodejs/node/pull/34962
440
+ description: Exposed as `require('path/posix')`.
437
441
-->
438
442
439
443
* {Object}
440
444
441
445
The ` path.posix ` property provides access to POSIX specific implementations
442
446
of the ` path ` methods.
443
447
448
+ The API is accessible via ` require('path').posix ` or ` require('path/posix') ` .
449
+
444
450
## ` path.relative(from, to) `
445
451
<!-- YAML
446
452
added: v0.5.0
@@ -568,13 +574,19 @@ method is non-operational and always returns `path` without modifications.
568
574
## ` path.win32 `
569
575
<!-- YAML
570
576
added: v0.11.15
577
+ changes:
578
+ - version: REPLACEME
579
+ pr-url: https://github.com/nodejs/node/pull/34962
580
+ description: Exposed as `require('path/win32')`.
571
581
-->
572
582
573
583
* {Object}
574
584
575
585
The ` path.win32 ` property provides access to Windows-specific implementations
576
586
of the ` path ` methods.
577
587
588
+ The API is accessible via ` require('path').win32 ` or ` require('path/win32') ` .
589
+
578
590
[ MSDN-Rel-Path ] : https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#fully-qualified-vs-relative-paths
579
591
[ `TypeError` ] : errors.md#errors_class_typeerror
580
592
[ `path.parse()` ] : #path_path_parse_path
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ module . exports = require ( 'path' ) . posix ;
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ module . exports = require ( 'path' ) . win32 ;
Original file line number Diff line number Diff line change 72
72
'lib/net.js' ,
73
73
'lib/os.js' ,
74
74
'lib/path.js' ,
75
+ 'lib/path/posix.js' ,
76
+ 'lib/path/win32.js' ,
75
77
'lib/perf_hooks.js' ,
76
78
'lib/process.js' ,
77
79
'lib/punycode.js' ,
Original file line number Diff line number Diff line change
1
+ import '../common/index.mjs' ;
2
+ import assert from 'assert' ;
3
+ import { posix } from 'path' ;
4
+ import pathPosix from 'path/posix' ;
5
+
6
+ assert . strictEqual ( pathPosix , posix ) ;
Original file line number Diff line number Diff line change
1
+ import '../common/index.mjs' ;
2
+ import assert from 'assert' ;
3
+ import { win32 } from 'path' ;
4
+ import pathWin32 from 'path/win32' ;
5
+
6
+ assert . strictEqual ( pathWin32 , win32 ) ;
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ require ( '../common' ) ;
4
+ const assert = require ( 'assert' ) ;
5
+
6
+ assert . strictEqual ( require ( 'path/posix' ) , require ( 'path' ) . posix ) ;
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ require ( '../common' ) ;
4
+ const assert = require ( 'assert' ) ;
5
+
6
+ assert . strictEqual ( require ( 'path/win32' ) , require ( 'path' ) . win32 ) ;
You can’t perform that action at this time.
0 commit comments