232 Commits

Author SHA1 Message Date
Nick Santos
543112bc00 Use writeStream 'finish' event instead of 'close'. Fixes https://github.com/jprichardson/node-fs-extra/issues/326 2016-12-20 22:59:16 -05:00
RyanZim
e3d37fdf0d copySync() should apply filter to directories like copy()
Fixes #180
2016-12-05 18:55:05 -05:00
mawni
3642289623 lib/walk-sync: enhance walkSync to return path and stats 2016-11-15 23:15:51 -08:00
Kyle Peyton
e785645367 Adding copy sync test for src file without write perms 2016-11-15 10:12:26 -08:00
Nathan Phillip Brink
efc2b76caf
Fix remove() no-globbing tests to skip/pass on Windows 2016-11-15 16:32:50 +00:00
Nathan Phillip Brink
b610d40e53
Test that remove() ignores glob characters.
After looking at rimraf, I began to fear that node-fs-extra, which
is based on rimraf, might also automatically glob things. I find
this confusing when the API is being used as an overlay of the
node built-in fs module which never expands globs. This test
explicitly verifies that the remove() function does not follow
glob characters.
2016-11-15 16:32:50 +00:00
RyanZim
fd3c9e6998 Remove move()'s broken limit option 2016-11-14 16:55:14 -05:00
Nathan Phillip Brink
57d5a39931 Fix move clobber tests to work around graceful-fs bug.
When trying to rename a directory over another directory, graceful-fs-4.1.10
(maybe other versions?) takes 1 minute to fail the call with an error.
This causes the test to timeout. The workaround is to increase the timeout
of that one test to 1m30s.

See https://github.com/isaacs/node-graceful-fs/issues/98
2016-11-14 11:11:52 -05:00
JP Richardson
d722ae91c8 Merge pull request #286 from agnivade/walkSync
Added walkSync function
2016-11-01 00:20:38 -05:00
RyanZim
ab3c29cd46 Update devDeps, fix lint error 2016-10-29 15:16:47 -04:00
RyanZim
bebbe78c46 Remove path-is-absolute
We are no longer supporting node v0.10
2016-10-28 18:23:03 -04:00
JP Richardson
0314876479 Merge pull request #300 from jprichardson/rimraf
Inline Rimraf
2016-10-28 15:20:19 -05:00
RyanZim
a837927988 Inline rimraf
We aren't using rimraf's glob support, and glob is a rather large
dependency.

Changes:

- Remove glob support from rimraf
- Remove move()'s dependency on rimraf; use fs-extra.remove instead
- Make rimraf a devDependency; it is used in the tests
2016-10-28 15:46:30 -04:00
RyanZim
071f8ce963 Fix typo
depreciated -> deprecated
2016-10-28 14:56:35 -04:00
RyanZim
ac6f688d10 Remove chmod call from copySync 2016-10-27 19:28:06 -04:00
RyanZim
9da4958d39 Warn when filter is a RegExp 2016-10-27 16:07:09 -04:00
JP Richardson
7632804320 Merge pull request #294 from jprichardson/ncp
BREAKING: Refactor lib/copy/ncp.js
2016-10-27 09:47:03 -05:00
RyanZim
3da22b5803 BREAKING: Refactor lib/copy/ncp.js
- Fix #233 - First argument passed to callback should be an Error
  object, not an array.
- Fix #272 - Should error when options.clobber is false and the
  destination exists.
- Remove options.limit, it is no longer needed with graceful-fs.
2016-10-27 09:44:23 -04:00
JP Richardson
396c7acadb Merge pull request #297 from jprichardson/32-bit
Warn about using preserveTimestamps on 32-bit node
2016-10-26 22:31:23 -05:00
RyanZim
0e0fcb88dc Warn about using preserveTimestamps on 32-bit node
Fixes #269
2016-10-26 20:14:26 -04:00
RyanZim
f83b13af8f Improve EEXIST error message for copySync 2016-10-26 19:54:56 -04:00
Hurricane Hamilton
2e7f75504e Escape '$' in replacement string for async file copying
Change made in /lib/copy/ncp.js to the string.replace in the onFile function
2016-10-26 11:31:59 -05:00
Hurricane Hamilton
5fc1421580 (Closes #271) lib/util/utimes: properly close file descriptors in the event of an error 2016-10-16 11:36:08 -05:00
Agniva De Sarker
574162d9ed Add recursive walkSync function 2016-10-14 13:59:16 +05:30
Zeus
1f49d10f18 Disable rimraf globbing since its not supported anywhere else within fs-extra
Add missing var declaration
2016-09-29 12:30:06 -07:00
Georgios Kalpakas
06a9c1a1fb tests: rename remote.test.js to remove.test.js 2016-09-11 01:26:08 +03:00
JP Richardson
9ed01a7bc0 Revert "package: remove path-is-absolute dep"
This reverts commit cfd0fa25f05a185a0758a3cb12e52854cc3170e4.
2016-04-28 09:48:40 -05:00
JP Richardson
cfd0fa25f0 package: remove path-is-absolute dep 2016-04-27 09:46:11 -05:00
JP Richardson
8c56e5b263 (Closes #209, Closes #237) lib/mkdirs: if invalid path char, return callback OR throw err 2016-04-18 04:19:26 -05:00
JP Richardson
a0cb04b0b0 (Closes #93) libs/mkdirs: prevent stack overflow if drive is not mounted in Windows 2016-04-18 03:52:19 -05:00
JP Richardson
76dcfa9acc lib/mkdirs/tests/root: skip if network drive 2016-04-17 18:04:38 -05:00
JP Richardson
5747fb303a (Closes #192) removed createOutputStream() 2016-04-17 14:56:36 -05:00
rjz
b50515c484 Adds dereference option to copySync
Extends the existing `dereference` option from `copy`/`ncp` to the
synchronous implementation, but leaves changes to each method's default
behavior for another day (#210).
2016-04-14 17:31:35 -07:00
glortho
d863f5fa00 standardjs lint fixes 2016-03-16 09:40:32 -04:00
glortho
4df3d35a29 throw error if src and dest are the same to avoid zeroing out + test 2016-03-15 09:47:02 -04:00
sang
ee02d2fc00 fix 'TypeError: callback is not a function' 2016-03-15 16:16:54 +08:00
Alexander Marenin
beef585ed5 fse.copy throws error when only src and dest provided
I have a lot of legacy code which uses old version(0.12.0) of fs-extra.
Old code does not work with new fs-extra due to it uses fse.copy with only 2 arguments `src` and `dest`.
Let's improve backward compatibility, guys
2016-01-27 18:12:31 +03:00
chinesedfan
38d1ab7fb3 [copySync]fix options.preserveTimestamps. Closes #205. 2016-01-05 15:09:29 +08:00
JP Richardson
d874b3bb5b tests: copy /dev/null. Refs #204. Closes #193. 2015-12-17 11:17:26 -06:00
Ray Bellis
141422ee38 Update ncp.js
allow copying of character or block devices (NB: copies contents, not the inode)
2015-12-17 15:59:28 +00:00
JP Richardson
631ed20f7b tests: copy-dev-null. Refs #193 2015-12-17 09:04:31 -06:00
JP Richardson
08ebcfab78 lib/json: bug fix, outputJson{Sync} wasn't setting spaces correctly. Closes #163. 2015-11-02 21:00:22 -06:00
bartland
8753c3d0bf Fix so copySync unlinking read only file will now work on
nodejs 0.10.40. This commit fixes #183.
2015-11-02 23:44:15 +11:00
bartland
e05c685e5a copySync updated to overwrite destination file if readonly and clobber
set to true. Added test case. This commit fixes #183.
2015-10-31 14:04:56 +11:00
bartland
22c19fe1d0 move.test modified to support testing files with both LF (NIX) and
CRLF (Windows) line endings. This commit fixes #188.
2015-10-31 12:36:12 +11:00
JP Richardson
cae574f45a lib/walk: extracted out into module klaw 2015-10-25 10:46:12 -05:00
JP Richardson
4b9805a9e4 lib/walk: made public, added tests 2015-10-24 16:55:12 -05:00
JP Richardson
7b0ff8172a JavaScript Standard Style tweaks 2015-10-21 06:24:01 -05:00
JP Richardson
955836b1ff lib/remove: removed alias 'delete()' 2015-08-28 15:16:31 -05:00
JP Richardson
25c1985ba1 JavaScript Standard Style 2015-08-28 15:14:10 -05:00