AvianFlu / ncp

Asynchronous recursive file copying with Node.js.
MIT License
680 stars 103 forks source link

Why is utimesSync being used instead of utimes? #86

Open DavidTPate opened 9 years ago

DavidTPate commented 9 years ago

Looking through the code I noticed that fs.utimesSync(path, atime, mtime) is being used to update timestamps instead of fs.utimes(path, atime, mtime, callback). Is there any particular reason?

I see that right below the usage of the synchronous method the callback is called, so I presume it could just be updated to execute the callback through the async utimes method instead.