Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

touch / touchSync was removed ? #102

Closed
maboiteaspam opened this issue Jan 5, 2015 · 4 comments
Closed

touch / touchSync was removed ? #102

maboiteaspam opened this issue Jan 5, 2015 · 4 comments

Comments

@maboiteaspam
Copy link

hi,

i don t really get why touch / touchSync methods was removed.

I was looking for this, and found out, the change log says it was recently removed.
https://github.com/jprichardson/node-fs-extra/search?q=touch&type=Code&utf8=%E2%9C%93

I ll fallback to https://github.com/isaacs/node-touch but seems weird we don t have it in fs-extra as it s kind of common usage.

Besides that, Thanks for this package !

@jprichardson
Copy link
Owner

Sorry, should have documented the "why" - that's arguably the most
important. It was removed because they didn't handle permissions like UNIX
touch does. So they were appropriately renamed to createFile/createFileSync
and ensureFile/ensureFileSync (both are the exact same). touch/touchSync
will probably come back, but with permission handling.

On Mon, Jan 5, 2015 at 8:15 AM, maboiteaspam [email protected]
wrote:

hi,

i don t really get why touch / touchSync methods was removed.

I was looking for this, and found out, the change log says it was recently
removed.

https://github.com/jprichardson/node-fs-extra/search?q=touch&type=Code&utf8=%E2%9C%93

I ll fallback to https://github.com/isaacs/node-touch but seems weird we
don t have it in fs-extra as it s kind of common usage.

Besides that, Thanks for this package !


Reply to this email directly or view it on GitHub
#102.

Simple & Secure Bitcoin Wallet: https://www.coinbolt.com
Bitcoin / JavaScript: http://cryptocoinjs.com
Follow me on Twitter: http://twitter.com/jprichardson

@maboiteaspam
Copy link
Author

Hi,

ok i ll check this. I needed to touch existing file. Not sure yet methods ensureFile will fill the job.

Thanks again!

@jprichardson
Copy link
Owner

touch() was renamed to createFile() and an alias to createFile() was setup as ensureFile(). So if touch() did what you wanted then ensureFile()/createFile() would as well since they are exactly the same.

@maboiteaspam
Copy link
Author

can t be more clear and straightforward, thanks a lot ! sorry for the doubts : )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants