mirror of
https://github.com/nodejs/node.git
synced 2025-05-16 15:50:47 +00:00
![]() The path module's `join, normalize, isAbsolute, relative and resolve` functions return/use the current directory if they are passed zero length strings. > process.version 'v2.3.4-pre' > path.win32.join('') '.' > path.posix.join('') '.' > path.win32.normalize('') '.' > path.posix.normalize('') '.' > path.win32.isAbsolute('') false > path.posix.isAbsolute('') false > path.win32.relative('', '') '' > path.posix.relative('', '') '' > path.win32relative('.', '') '' > path.posix.relative('.', '') '' > path.posix.resolve('') '/home/thefourtheye/Desktop' > path.win32.resolve('') '\\home\\thefourtheye\\Desktop' Since empty paths are not valid in any of the operating systems people normally use, this behaviour might be a surprise to the users. This commit introduces "Notes" about this, wherever applicable in `path`'s documentation. The tests makes sure that the behaviour is intact between commits. PR-URL: https://github.com/nodejs/io.js/pull/2106 Reviewed-By: Rich Trott <rtrott@gmail.com> |
||
---|---|---|
.. | ||
_toc.markdown | ||
addons.markdown | ||
all.markdown | ||
assert.markdown | ||
buffer.markdown | ||
child_process.markdown | ||
cluster.markdown | ||
console.markdown | ||
crypto.markdown | ||
debugger.markdown | ||
dgram.markdown | ||
dns.markdown | ||
documentation.markdown | ||
domain.markdown | ||
errors.markdown | ||
events.markdown | ||
fs.markdown | ||
globals.markdown | ||
http.markdown | ||
https.markdown | ||
index.markdown | ||
modules.markdown | ||
net.markdown | ||
os.markdown | ||
path.markdown | ||
process.markdown | ||
punycode.markdown | ||
querystring.markdown | ||
readline.markdown | ||
repl.markdown | ||
smalloc.markdown | ||
stream.markdown | ||
string_decoder.markdown | ||
synopsis.markdown | ||
timers.markdown | ||
tls.markdown | ||
tty.markdown | ||
url.markdown | ||
util.markdown | ||
v8.markdown | ||
vm.markdown | ||
zlib.markdown |