49 Commits

Author SHA1 Message Date
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
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
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
Mani Maghsoudlou
5bdbdc4fc8 Skip copySync preserveTimestamp tests on older node versions 2017-11-17 16:43:54 -08: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
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
RyanZim
5f888babe0 Skip copy & copySync timestamp tests on 32-bit computers 2017-06-27 11:37:02 -04:00
RyanZim
a86d8b4ba1 Use Buffer.allocUnsafe() in enviroments that support it 2017-03-16 15:33:03 -04:00
RyanZim
e02c07bc26 Revert "Use Buffer.alloc() instead of deprecated new Buffer() in copy-file-sync, add engines field to package.json to specify min node v4.5.0"
This broke support for Node.js v4.0.0-v4.5.0

This reverts commit 5597bd5b67f7d060f5f5bf26e9635be48330f5d7.
2017-03-15 13:44:56 -04:00
Mani Maghsoudlou
5597bd5b67 Use Buffer.alloc() instead of deprecated new Buffer() in copy-file-sync, add engines field to package.json to specify min node v4.5.0 2017-03-06 17:07:40 -08:00
Mani Maghsoudlou
e261c49b5c Add done() to copySync tests when setTimeout() is used 2017-02-22 12:21:48 -08:00
Mani Maghsoudlou
75d8ba7c32 Remove unnecessary param from filter regex in copy and copySync, remove done() from copySync test 2017-02-22 11:52:14 -08:00
Mani Maghsoudlou
89230976b9 Add dest parameter to filter option in copy and copySync 2017-02-22 04:03:28 -08:00
JPeer264
4782e82203 Refactor test copy-sync 2017-02-21 09:10:18 +01:00
JPeer264
f258e5bfed Refactor copy-sync 2017-02-14 19:09:36 +01:00
JPeer264
29e61ab637 Refactor copy-file-sync 2017-02-14 19:00:21 +01:00
RyanZim
5be5ae3053 Rename clobber to overwrite
Keep clobber for backwards compatibility

Fixes #172
2016-12-29 17:38:45 -05:00
RyanZim
3fa83d4f0d BREAKING: Do not error when copy destination exists & clobber: false
Add errorOnExist option for users that want an error

Resolves #321
2016-12-24 15:53:23 -05:00
RyanZim
e3d37fdf0d copySync() should apply filter to directories like copy()
Fixes #180
2016-12-05 18:55:05 -05:00
Kyle Peyton
e785645367 Adding copy sync test for src file without write perms 2016-11-15 10:12:26 -08: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
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
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
chinesedfan
38d1ab7fb3 [copySync]fix options.preserveTimestamps. Closes #205. 2016-01-05 15:09:29 +08: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
JP Richardson
7b0ff8172a JavaScript Standard Style tweaks 2015-10-21 06:24:01 -05:00
JP Richardson
f023eec02b lib/copy-sync/__tests__/copy-sync-dir: fixed 2015-07-09 05:17:18 -05:00
JP Richardson
a512f12c7d lib/copy-sync/__tests__/copy-sync-preserve-time: split into more files 2015-07-09 04:29:21 -05:00
JP Richardson
e9221d6bcd lib/copy-sync/__tests__/copy-sync-preserver-time: renamed 2015-07-08 09:55:08 -05:00
JP Richardson
6d788787fe lib/{copy, copy-sync}/__tests__/preserve-time: fixed for Windows. 2015-07-03 13:53:28 -05:00
JP Richardson
57d04ba0e3 lib/copy-sync/__tests__/preserve-time: extracted out from ./copy-sync.test 2015-07-03 13:45:42 -05:00
JP Richardson
ac2d8d2c9c lib/copy-sync: split out of lib/copy/ 2015-07-01 13:29:25 -05:00