最終更新:2023-12-25 (月) 19:54:15 (145d)
path.join
Top / path.join
joins all given path segments together using the platform-specific separator as a delimiter, then normalizes the resulting path.
https://nodejs.org/api/path.html#pathjoinpaths
メモ
var filename = path.join(rootDirectory, userSuppliedFilename);
- Now filename contains an absolute path and doesn't contain .. sequences anymore - path.join takes care of that.
メモ
- https://github.com/nodejs/node/blob/main/lib/path.js
- return win32.normalize(joined);
- return posix.normalize(joined);