Kyle E. Mitchell
6f7cdf7ef0
doc: clarify fs.link and fs.linkSync arguments
...
Clarifies documentation by replacing the argument names `srcpath`
and `dstpath` with more descriptive `existingPath` and `newPath`,
reflecting how POSIX describes `link()`.
PR-URL: https://github.com/nodejs/node/pull/9145
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2016-10-21 08:01:07 -07:00
Nikolai Vavilov
aa4698b66d
doc: fix typo
...
PR-URL: https://github.com/nodejs/node/pull/9089
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-10-14 01:41:53 +03:00
Christopn Noelke
23b9625c84
doc: add example for file existence with fs.stat
...
Add an example on how to test if a file exists with fs.stat.
Also add a link to the Common System Errors.
Fixes: https://github.com/nodejs/issues/6752
PR-URL: https://github.com/nodejs/node/pull/8585
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com >
2016-10-07 09:50:13 -07:00
ss22ever
3945943d58
doc: fixup link in fs.md
...
PR-URL: https://github.com/nodejs/node/pull/8940
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2016-10-06 11:20:03 -07:00
Dan Fabulich
7b5ffa46fe
fs,doc: undeprecate existsSync
...
This has been dragged through various long discussions and has been
elevated to the CTC multiple times.
As noted in
https://github.com/nodejs/node/pull/7455#issuecomment-228961530 ,
while this API is still generally considered an anti-pattern, there are
still use-cases it is best suited for, such as checking if a git rebase
is in progress by looking if ".git/rebase-apply/rebasing" exists.
The general consensus is to undeprecate just the sync version, given
that the async version still has the "arguments order inconsistency"
problem.
The consensus at the two last CTC meetings this came up at was also
to undeprecate existsSync() but keep exists() deprecated.
See: https://github.com/nodejs/node/issues/8242 &
https://github.com/nodejs/node/issues/8330
(Description write-up by @Fishrock123)
Fixes: https://github.com/nodejs/node/issues/1592
Refs: https://github.com/nodejs/node/pull/4217
Refs: https://github.com/nodejs/node/pull/7455
PR-URL: https://github.com/nodejs/node/pull/8364
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2016-10-05 15:10:40 -04:00
Danny Guo
99ab686cd3
doc: clarify fs.utimes() arguments
...
Make it clear that atime and mtime should be in seconds.
PR-URL: https://github.com/nodejs/node/pull/8651
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com >
2016-09-20 11:11:01 -07:00
Dan Fabulich
143d38c650
doc: bad/better examples for fs.access() and fs.exists()
...
PR-URL: https://github.com/nodejs/node/pull/7832
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2016-09-01 08:22:00 -07:00
Sakthipriyan Vairamani
c8619ea3c3
doc: improve fs.truncate functions' documentation
...
The default value of the `len` parameter is zero and it is included in
the documenetation.
This patch also has examples of how `ftruncate` can be used.
PR-URL: https://github.com/nodejs/node/pull/7648
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-08-27 19:51:20 +05:30
Sakthipriyan Vairamani
6e50fc7637
doc: include the optional options parameter
...
`mkdtemp` functions accept an optional `options` parameter, which can
be either a String specifying encoding, or an Object with an `encoding`
property.
PR-URL: https://github.com/nodejs/node/pull/7842
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com >
2016-08-24 16:15:11 -07:00
cjihrig
d83373d800
2016-08-15, Version 6.4.0 (Current)
...
Notable changes:
* build: zlib symbols and additional OpenSSL symbols are now exposed on Windows platforms. (Alex Hultman) https://github.com/nodejs/node/pull/7983 and https://github.com/nodejs/node/pull/7576
* child_process, cluster: Forked child processes and cluster workers now support stdio configuration. (Colin Ihrig) https://github.com/nodejs/node/pull/7811 and https://github.com/nodejs/node/pull/7838
* child_process: argv[0] can now be set to arbitrary values in spawned processes. (Pat Pannuto) https://github.com/nodejs/node/pull/7696
* fs: fs.ReadStream now exposes the number of bytes it has read so far. (Linus Unnebäck) https://github.com/nodejs/node/pull/7942
* repl: The REPL now supports editor mode. (Prince J Wesley) https://github.com/nodejs/node/pull/7275
* util: inspect() can now be configured globally using util.inspect.defaultOptions. (Roman Reiss) https://github.com/nodejs/node/pull/8013
Refs: https://github.com/nodejs/node/issues/8020
PR-URL: https://github.com/nodejs/node/pull/8070
2016-08-16 10:36:00 -04:00
Bartosz Sosnowski
08996fde3c
fs: restore JS implementation of realpath
...
This reverts parts of https://github.com/nodejs/node/commit/b488b19eaf2b2e7a3ca5eccd2445e245847a5f76
restoring javascript implementation of realpath and realpathSync.
Fixes: https://github.com/nodejs/node/issues/7175
Fixes: https://github.com/nodejs/node/issues/6861
Fixes: https://github.com/nodejs/node/issues/7294
Fixes: https://github.com/nodejs/node/issues/7192
Fixes: https://github.com/nodejs/node/issues/7044
Fixes: https://github.com/nodejs/node/issues/6624
Fixes: https://github.com/nodejs/node/issues/6978
PR-URL: https://github.com/nodejs/node/pull/7899
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2016-08-12 13:07:55 +02:00
Linus Unnebäck
4a87abb8e8
fs: add bytesRead to ReadStream
...
Add a property named bytesRead that exposes how many bytes that have
currently been read from the file. This brings consistency with
WriteStream that has bytesWritten and net.Socket which have both
bytesRead and bytesWritten.
Fixes: https://github.com/nodejs/node/issues/#7938
PR-URL: https://github.com/nodejs/node/pull/7942
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2016-08-08 10:11:17 -07:00
kibertoad
beea23af65
doc: clarify fd closing by fs.readFile etc.
...
Ref: https://github.com/nodejs/node/issues/7560
PR-URL: https://github.com/nodejs/node/pull/7561
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2016-08-08 15:24:33 +02:00
Anna Henningsen
c809b88345
doc: use blockquotes for Stability: markers
...
Use blockquotes instead of code blocks for stability markers in
the docs. Doing that:
- Makes the makers appear correctly when viewed e.g. on github.
- Allows remark-lint rules like `no-undefined-references` to work
properly (https://github.com/nodejs/node/pull/7729 ).
PR-URL: https://github.com/nodejs/node/pull/7757
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-08-04 22:43:34 +02:00
saadq
28d9485c25
doc: fix inconsistencies in code style
...
Adds missing semicolons, removes extra white space, and properly indents
various code snippets in the documentation.
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/7745
2016-07-15 13:51:58 -04:00
Claudio Rodriguez
6e15ae98fe
fs: rename event to eventType in fs.watch listener
...
The name 'event' for the argument of the listener in
fs.watch was confusing considering FSWatcher also had
events. This changes the name of the argument to
eventType.
Fixes: https://github.com/nodejs/node/issues/7504
PR-URL: https://github.com/nodejs/node/pull/7506
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2016-07-14 19:24:48 +01:00
Сковорода Никита Андреевич
a58b48bc3b
doc: various documentation formatting fixes
...
* Fix markdown code sample in releases.md, it was <a id="x.y.x></a>"
* Fix some markdown errors, e.g. in changelogs
* Fix broken defs links, e.g. in domain-postmortem.md
* Fix other broken refs, by addaleax
* Add links to some defs that were present but not linked to
* Remove dead defs
* Move defs to the bottom (one file affected)
* Add language indicators to all code blocks, using `txt` when no
specific language could be chosen
* Some minor formatting changes (spaces, ident, headings)
PR-URL: https://github.com/nodejs/node/pull/7637
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-07-14 12:26:50 +03:00
Richard Lau
a06ccdbdb5
doc: correct added: information for fs.access
...
fs.access and fs.accessSync were added to Node v0.11.15 via 2944934
PR-URL: https://github.com/nodejs/node/pull/7299
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Ref: https://github.com/nodejs/node/pull/6717
Ref: https://github.com/nodejs/node/issues/6578
2016-06-18 21:15:52 +02:00
Lance Ball
d976d66cfc
doc: clarify fs.access works on directories too.
...
This is maybe more verbose than needed, since the same information is
repeated several times. An alternative, maybe a single short sentence at
the beginning is better. E.g.
Fixes: https://github.com/nodejs/node/issues/7110
PR-URL: https://github.com/nodejs/node/pull/7113
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-06-06 08:46:08 -07:00
Michael Dawson
138c7af42a
doc: add links to platform specific mechanisms
...
As requested in earlier PR adding detail for Aix, add link
for each of the platform specific technologies used for
file system watching.
PR-URL: https://github.com/nodejs/node/pull/7071
Reviewed-By: Robert Jefe Lindstädt <robert.lindstaedt@gmail.com >
Reviewed-By: Rod Vagg <rod@vagg.org >
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com >
2016-06-02 11:28:53 -04:00
Michael Dawson
8af25a39d3
doc: add info on what's used for fswatch on AIX
...
Info is provided on for the other OS's. Add similar
level of info for AIX.
PR-URL: https://github.com/nodejs/node/pull/6837
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2016-05-27 16:44:32 -04:00
Sakthipriyan Vairamani
2ef83590ce
doc: make param names consistent & fix doc link
...
The parameter to `fs.mkdtemp` is actually `prefix`, not `template`,
because the string passed is appended with the randomly generated
string.
The doc link for `fs.mkdtemp()` was missing and it is included in this
patch.
PR-URL: https://github.com/nodejs/node/pull/6832
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-05-20 07:39:21 -07:00
Sakthipriyan Vairamani
acc1142e25
doc: fix mkdtemp example by removing hyphen
...
The example uses only `/tmp`, not `/tmp-`. So, the result cannot be
`/tmp-abc123`, but just `/tmpabc123`.
PR-URL: https://github.com/nodejs/node/pull/6834
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-05-20 07:36:01 -07:00
Robert Jefe Lindstaedt
ae0f68d6e1
doc: add note for fs.watch virtualized env
...
Fixes: https://github.com/nodejs/node/issues/6765
PR-URL: https://github.com/nodejs/node/pull/6809
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2016-05-19 15:43:04 +02:00
James M Snell
2ccba1f9fa
doc: clarify fs.mkdtemp prefix argument
...
Per: https://github.com/nodejs/node/issues/6142
Clarify the prefix argument.
Fixes: https://github.com/nodejs/node/issues/6142
PR-URL: https://github.com/nodejs/node/pull/6800
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Roman Klauke <romaaan.git@gmail.com >
2016-05-17 20:50:18 -07:00
Anna Henningsen
ba10ea8f3a
doc: add added: information for fs
...
Ref: https://github.com/nodejs/node/issues/6578
PR-URL: https://github.com/nodejs/node/pull/6717
Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-05-17 23:16:34 +02:00
James M Snell
dcccbfdc79
src: refactor require('constants')
...
The require('constants') module is currently undocumented and mashes
together unrelated constants. This refactors the require('constants')
in favor of distinct os.constants, fs.constants, and crypto.constants
that are specific to the modules for which they are relevant. The
next step is to document those within the specific modules.
PR-URL: https://github.com/nodejs/node/pull/6534
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com >
2016-05-17 11:05:18 -07:00
DavidCai
32b46d91a7
doc: update fs callback example error stack
...
Update the error stack printed in the default callback
example in the fs doc, matching the latest lib/fs.js.
Truncates the stack to make it easier to update in the future.
PR-URL: https://github.com/nodejs/node/pull/6617
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-05-15 15:01:49 +01:00
Faiz Halde
fc96fdaf68
doc: appendFileSync accepts fd as well
...
Refs: https://github.com/nodejs/node/issues/6508
PR-URL: https://github.com/nodejs/node/pull/6707
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-05-13 09:32:41 -07:00
Saúl Ibarra Corretgé
a661e26300
doc: undocument fs.open's 'rs' mode
...
Using O_SYNC with O_RDONLY is basically a noop.
Closes: https://github.com/nodejs/node/issues/6730
PR-URL: https://github.com/nodejs/node/pull/6732
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl >
2016-05-13 12:08:02 +02:00
Jenna Vuong
2aa376914b
doc: adds 'close' events to fs.ReadStream and fs.WriteStream
...
Add 'close' event to doc/api/fs.md --> fs.ReadStream
Add 'close' event to doc/api/fs.md --> fs.WriteStream
Add 'close event to doc/api/stream.md --> stream.Writable
From squashed history:
Add 'close' event to stream.Writable per Issue #6484
Add #### prefix to Event: 'close' and backticks to 'close'
similar to stream.Readable event: 'close' section
Add more specifics to 'close' events for fs.ReadStream
and fs.WriteStream
Fix/Changed 'close' event from 'fs.ReadStream' to 'fs.WriteStream'
wrapped long lines at 80 chars, reworded
per Issue #6484
including the 'close' event as optional
add 'close' event as optional in stream.Readable
per issue #6484
doc: Add 'close' events to fs.ReadStream, 80char nit
Fixes : #6484
PR-URL: https://github.com/nodejs/node/pull/6499
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com >
2016-05-03 20:35:50 +02:00
Kevin Donahue
51e7bc8f79
doc: linkify remaining references to fs.Stats object
...
One reference to the `fs.Stats object` is linkified, while two other
similarly made references to the object are not linkified.
Linking the remaining references makes sense due to similar context.
PR-URL: https://github.com/nodejs/node/pull/6485
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-05-03 10:19:23 -07:00
Rich Trott
9f8d0ea6db
doc: fix sentence fragment in fs doc
...
PR-URL: https://github.com/nodejs/node/pull/6488
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Alexander Makarenko <estliberitas@gmail.com >
2016-05-01 14:45:40 -07:00
phette23
cebd52539e
doc: fix fs.realpath man pg links
...
There is no realpath(2), only in sections 1 & 3
causes broken link on nodejs.org/api/ docs
PR-URL: https://github.com/nodejs/node/pull/6451
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-05-01 14:37:11 -07:00
Jeremiah Senkpiel
2011f2c6dc
doc: fix position of fs.readSync()
...
PR-URL: https://github.com/nodejs/node/pull/6399
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-04-26 12:55:56 -04:00
Robert Jefe Lindstaedt
ae991e7577
doc: add note for platform specific flags fs.open()
...
Note describing platform specific differences in fs.open
E.g. fs.open('<directory>', 'a+', console.log)
Fixes: https://github.com/nodejs/node/issues/3643
PR-URL: https://github.com/nodejs/node/pull/6136
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-04-22 11:32:22 -07:00
Robert Jefe Lindstaedt
0800c0aa72
doc: git mv to .md
...
* doc: rename .markdown references in content
* doc: rename to .md in tools
* doc: rename to .md in CONTRIBUTING.md
PR-URL: https://github.com/nodejs/node/pull/4747
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: techjeffharris
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2016-04-20 16:34:27 -07:00