![]() ForĮxample, path.resolve('C:\\') can potentially return a different result than This behavior can be observed when using a drive path without a backslash. On Windows Node.js follows the concept of per-drive working directory. To achieve consistent results when working with POSIX file paths on any To achieve consistent results when working with Windows file paths on any ![]() So using path.basename() might yield different results on POSIX and Windows: ![]() Specifically, when running onĪ Windows operating system, the node:path module will assume that System on which a Node.js application is running. The default operation of the node:path module varies based on the operating It can be accessed using: const path = require( 'node:path') Windows vs. The node:path module provides utilities for working with file and directory
0 Comments
Leave a Reply. |