0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

255 Commits

Author SHA1 Message Date
Vse Mozhet Byt
31da3757fa doc: update and modernize examples in fs.ms
* unify quotes in fs.md
* avoid quote escaping in fs.md
* simplify logics in fs.md
* concatenation -> template literal in fs.md
* add missing callback in fs.md
* fix typo in fs.md
* update output example in fs.md

PR-URL: https://github.com/nodejs/node/pull/12035
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-27 10:33:23 -07:00
Luca Maraschi
eed87b1637 fs: (+/-)Infinity and NaN invalid unixtimestamp
Infinity and NaN are currently considered valid input when generating a
unix time stamp but are defaulted arbitrarly to Date.now()/1000. This
PR removes this behaviour and throw an exception like all the other
invalid input types.

PR-URL: https://github.com/nodejs/node/pull/11919
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-21 22:31:04 -07:00
Roman Reiss
5f32024055
doc/tools: fix more type inconsistencies
- fix a number of uppercase types
- lowercase 'integer'
- consistent formatting in crypto

PR-URL: https://github.com/nodejs/node/pull/11697
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-03-08 17:19:24 +01:00
Roman Reiss
ff1361957d
doc: consistent case for primitive types
PR-URL: https://github.com/nodejs/node/pull/11167
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-03-02 17:55:45 +01:00
Anna Henningsen
d2e4742a8d
doc: add changelogs for fs
PR-URL: https://github.com/nodejs/node/pull/11489
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
2017-02-24 02:06:31 +01:00
Vse Mozhet Byt
52b253677a doc: fix sorting in API references
PR-URL: https://github.com/nodejs/node/pull/11331
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2017-02-20 13:11:11 -08:00
Gireesh Punathil
46edd940e8 fs: re-enable watch facility in AIX
On AIX, watch feature depends on AHAFS based Event infrastructure.
While in principle the watch use case is same across platforms, there
are subtle differences in the way AIX deals with this, with few
behavioral changes (external).

This commit addresses an assertion failure on folder watch, enabling the
AIX code for watch feature which was masked under a macro, open up
relevant test cases, skip tests which comes under the AIX limitation,
and make the document changes as appropriate.

Refs: https://github.com/nodejs/node/pull/11094
Refs: https://github.com/nodejs/node/issues/5085
PR-URL: https://github.com/nodejs/node/pull/10085
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-02-09 13:53:45 -05:00
Jessica Quynh Tran
762f260c4d
doc: clarifying variables in fs.write()
This commit clarifies variables in the Filesystem docs.
Prior, the documentation for fs.write() had an ambiguous
remark on the parameters of offset and length.

Therefore, this commit makes explicit that the length parameter
in fs.write() is used to denote the number of bytes, which is
a clearer reference for its usage.

PR-URL: https://github.com/nodejs/node/pull/9792
Ref: https://github.com/nodejs/node/issues/7868
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2017-01-18 13:39:21 -05:00
Anna Henningsen
f2ef850f11
fs: support Uint8Array input to methods
Allow `fs.read`, `fs.write` and `fs.writeFile` to take
`Uint8Array` arguments.

PR-URL: https://github.com/nodejs/node/pull/10382
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
2016-12-26 10:08:42 +01:00
Wes Tyler
384dafe4c9
doc: clarify fs.createReadStream options
* start/end start *counting* at 0
* If fd is specified and start is omitted or undefined,
  fs.createReadStream() reads sequentially from the current file
  position.

Fixes: https://github.com/nodejs/node/issues/7099
PR-URL: https://github.com/nodejs/node/pull/10078
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-12-03 14:21:15 +01:00
Anna Henningsen
8a6b37bc51
doc: remove backtick escaping for manpage refs
Removing backticks will make the doctool emit links to the man pages.

PR-URL: https://github.com/nodejs/node/pull/9632
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2016-11-20 00:56:25 +01:00
Daniel Bevenius
367065be4b doc: make comment indentation consistent
Currently, some of the docs use different indentation for comments
in the code examples. This commit makes the indentation consistent
by putting the comments at the beginning of the line (really no
indentation that is).

PR-URL: https://github.com/nodejs/node/pull/9518
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2016-11-16 07:52:57 +01:00
Nikolai Vavilov
b209a6e271
doc: clarify eventType in fs.watch
'rename' is confusing, and it's not clear what "they" refers to.

Fixes: https://github.com/nodejs/node/issues/9082
PR-URL: https://github.com/nodejs/node/pull/9318
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-11-15 23:12:00 +01:00
Timothy
452b4dc8a8
doc: fix fs constants link
https://nodejs.org/api/fs.html#fs_fs_constants links to itself rather
than to https://nodejs.org/api/fs.html#fs_fs_constants_1

PR-URL: https://github.com/nodejs/node/pull/9508
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-11-11 21:16:55 +01:00
Andreas Lind
0b5191f15d fs: Fix default params for fs.write(Sync)
Add support for fs.write(fd, buffer, cb) and fs.write(fd, buffer, offset, cb)
as documented at
https://nodejs.org/api/fs.html#fs_fs_write_fd_data_position_encoding_callback
and equivalently for fs.writeSync

Update docs and code comments to reflect the implementation.

PR-URL: https://github.com/nodejs/node/pull/7856
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2016-11-08 09:48:41 -08:00
Zeke Sikelianos
f9814a2caf
doc: use 'an' over 'a', remove redundant sentence
PR-URL: https://github.com/nodejs/node/pull/9345
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-11-01 23:56:46 +01:00
Zeke Sikelianos
746da42cae
doc: add more internal links to fs.Stats object
PR-URL: https://github.com/nodejs/node/pull/9345
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-11-01 23:55:57 +01:00
coderaiser
ffa4227499
doc: fs: fix link to mkdtemp
PR-URL: https://github.com/nodejs/node/pull/9379
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-11-01 20:08:30 +01:00
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 b488b19eaf
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