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

Copy failing if dest directory doesn't exist. Is this intended? #29

Closed
philipwalton opened this issue Oct 6, 2013 · 3 comments
Closed

Comments

@philipwalton
Copy link

I'm getting following error when trying to copy files. It only seems to happen if the file needs to go into a directory that doesn't exist.

Is this supported behavior?

Here's what I'm doing:

fsExtra.copy('page.html', 'foo/bar/page.html')

And this is the error I get:

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: ENOENT, open '/Users/philip/Projects/torpedo/foo/bar/page.html'
@jprichardson
Copy link
Owner

This isn't intended or unintended. It seems like this functionality would be useful in a library like this to save you from having to check if the directory exists. I'll look into adding it.

@jprichardson
Copy link
Owner

OK, this has been implemented. Check out v0.7.0.

@philipwalton
Copy link
Author

Awesome, thanks for the quick work. I'll let you know if I have any problems with it.

ovr pushed a commit to ovr/node-fs-extra that referenced this issue Nov 12, 2020
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