350 Commits

Author SHA1 Message Date
Pete Gonzalez
ddc1a2f9d4 Fix removeSync() to eliminate spurious ENOTEMPTY errors on Windows (#646)
Fix removeSync() to measure its retry interval in milliseconds instead of CPU cycles
2018-11-07 07:43:31 -05:00
Ram Hejazi
1a4e88543b Add missing element for fs.lchmod promisification (#595) (#596) 2018-07-16 20:58:58 -04:00
Maxime Bargiel
384aae04e8 copy*: Set new directory mode only after copying files (MacOS fix) (#600)
Fixes #599
2018-07-16 20:57:29 -04:00
Mani Maghsoudlou
e340861b4f [BREAKING] copy*(): use ino to check identical paths (#582) 2018-07-16 20:52:21 -04:00
Miroslav Bajtoš
2ffb64cf8e Fix fs.promises ExperimentalWarning on Node 10.1.0 (#578) 2018-05-09 18:59:56 -04:00
Mani Maghsoudlou
bbbc2db97e copy*(): refactor copyDirItems() to avoid passing null param (#570) 2018-04-25 07:51:49 -04:00
Mani Maghsoudlou
b02eea6a37 Use strict assert in all tests (#569) 2018-04-19 07:28:45 -04:00
Mani Maghsoudlou
da69c573e3 copy & copySync: handle case-insensitive paths, check paths stricter before copying (#568) 2018-04-18 07:38:28 -04:00
Ryan Zimmerman
20c82ab4dd
Run stricter linter to cleanup problems and force ES6 usage (#566)
Also shorten fs.write() promise code
2018-04-10 08:12:12 -04:00
Ryan Zimmerman
5170b4f854 copy*() preserveTimestamps: false behavior is OS-dependent
Update docs and remove tests to reflect this
2018-04-06 12:55:53 -04:00
Mani Maghsoudlou
50c098ec0c copy & copySync: do not overwrite src & dest paths to avoid side effects (#554) 2018-04-06 11:31:19 -04:00
Mani Maghsoudlou
6b90ccf962 move: rewrite move to use fs.rename (#549)
* rewrite move to use fs.rename

* add old tests

* use strictEqual for error message assertion

* refactor move, remove comments

* fix move when overwrite is true and dest exists

* remove unnecessary checking of EPERM error
2018-04-06 11:25:57 -04:00
wontem
7e2aba069f remove extra step in reading loop 2018-02-26 13:33:16 +03:00
Igor Bykov
a0d44c1773 Fix function isSrcSubdir in the copy-sync.js and copy.js (#541) 2018-02-20 19:08:50 -05:00
Mani Maghsoudlou
2ce4bff58b Remove copy test fixtures dir, refactor copy & copySync timestamp test 2017-12-15 15:17:39 -08:00
RyanZim
12126805e0 Merge branch 'develop'
Closes #523
2017-12-11 11:00:52 -05:00
Mani Maghsoudlou
a06f88b109 Apply the async filter to initial filter checking in copy 2017-11-19 00:34:48 -08:00
JP Richardson
86d2ad6da7
Merge pull request #519 from jprichardson/rewrite-copySync
Rewrite copySync
2017-11-19 00:17:22 -06:00
Mani Maghsoudlou
5bdbdc4fc8 Skip copySync preserveTimestamp tests on older node versions 2017-11-17 16:43:54 -08:00
Maël Nison
d21da93138 Fixes fs-extra on linux 2017-11-17 16:38:15 +00:00
RyanZim
9732252b94 Allow copy's filter to return a Promise 2017-11-14 12:55:53 -05:00
Mani Maghsoudlou
5d1f2d3c2b Use fs.chmodSync() before preserveTimestamp 2017-11-11 01:48:37 -08:00
Mani Maghsoudlou
d6f6da1e71 Use srcStat param in copyFileFallback 2017-11-11 01:01:40 -08:00
Mani Maghsoudlou
546216ccdd Remove setTimeout when preserveTimestamp is true 2017-11-10 18:20:40 -08:00
Mani Maghsoudlou
fda912a381 Rewrite copySync, add more tests, remove fixtures folder 2017-11-10 17:57:16 -08:00
Mani Maghsoudlou
199ec9f2c2 Apply filter before creating parent dir in copy 2017-11-09 15:14:57 -08:00
Mani Maghsoudlou
c59e0a6e2e Fix streams initialization in copyFileFallback (introduced by @unkelpehr) 2017-11-09 11:12:46 -08:00
Ryan Zimmerman
603b8bb661
BREAKING: Don't allow copy()/copySync()'s filter option to be a Regex (#512)
This was deprecated previously, and is now removed.
2017-11-09 09:46:04 -05:00
Mani Maghsoudlou
1abc2a3fb6 Use native fs.copyFileSync in supported envs, add utimesMillisSync function to util/utimes.js 2017-11-01 00:20:06 -07:00
Mani Maghsoudlou
0bd52793a2 Add native fs.copyFile to copy() 2017-10-30 23:59:22 -07:00
Mani Maghsoudlou
fe0bfe2931 Rewrite copy to use recursive pattern for dirs, add more tests 2017-10-20 13:43:08 -07:00
RyanZim
ddb5cb47a5 Use octal notation for chmod values in rimraf.js
Backports 38b907fd64
Fixes #484
2017-10-18 15:00:34 -04:00
RyanZim
ef9ade4929 Universalify fs.copyFile when available
Refs #490
2017-09-12 18:47:43 -04:00
RyanZim
7a9bb173b9 Upgrade to jsonfile 4.0.0 for EOL option support 2017-09-12 18:47:43 -04:00
RyanZim
3fc58948ad ensureFile & ensureFileSync should error when the path is a directory
Fixes #465
2017-07-20 11:00:54 -04:00
Ryan Zimmerman
bd0a20092d Merge pull request #449 from jprichardson/read-write-obj
BREAKING: fs.read() & fs.write() should return objects
2017-07-14 13:21:19 -04:00
JP Richardson
df6aa07f7b Merge pull request #458 from jprichardson/prevent-move-into-itself
Prevent move into itself
2017-07-12 14:37:56 -05:00
RyanZim
33fbe78c3d Apply upstream rimraf fixes
e8b10a79c2
d53235de86
e8cd6853ba
2017-07-10 15:23:25 -04:00
Mani Maghsoudlou
d99d8a19d6 Fix isSrcSubdir() split bug 2017-07-09 22:30:01 -07:00
Mani Maghsoudlou
f8f441ae63 Refactor isSrcSubdir() in move 2017-07-09 22:22:07 -07:00
Mani Maghsoudlou
16dc81e1f8 Fix the issue of moving into itself 2017-07-09 21:31:44 -07:00
RyanZim
5f888babe0 Skip copy & copySync timestamp tests on 32-bit computers 2017-06-27 11:37:02 -04:00
RyanZim
e4c3618ad0 BREAKING: fs.read() & fs.write() should return objects
For forward-compat with util.promisify()
2017-06-26 15:45:33 -04:00
RyanZim
dd85f38ab1 Fix typo that broke outputJSONSync()
Reorganize file to put async methods first
2017-05-17 12:28:22 -04:00
RyanZim
5bfcb64b21 move() should error when src & dest are the same and src doesn't exist
Fixes #414; bug introduced in #378
2017-05-02 19:29:51 -04:00
RyanZim
891f483cfc Upgrade standard 2017-04-26 10:13:40 -04:00
RyanZim
df125bebf7 Use pathExists() internally 2017-04-26 10:04:17 -04:00
RyanZim
3f7988de22 Add pathExists() and pathExistsSync() 2017-04-26 10:04:07 -04:00
RyanZim
03b2080b7e Universalify fs-extra methods 2017-04-26 10:04:07 -04:00
RyanZim
dba0cbb595 Universalify native fs methods 2017-04-26 10:04:07 -04:00