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: options object or filter to pass to ncp #100

Merged
merged 1 commit into from
Jan 5, 2015

Conversation

overlookmotel
Copy link
Contributor

Hi.

This PR allows copy() to be called with the following signature:

fs.copy(src, dest, [options], callback)

The options object is passed to ncp. The original signature fs.copy(src, dest, [filters], callback) still works as it checks for a function or RexExp and if so treats it as a filter option. All tests pass.

My use case is wanting to pass in a transform function to ncp. Yes, OK, I could just use ncp module direct, but I've got used to using fs-extra and I like it!

I understand if you think this adds extra complexity and don't want it, but please let me know either way, so I can publish a fork instead for my own use if needs be.

@jprichardson
Copy link
Owner

Thanks! I'll review tomorrow, but I don't see any issues with it ATM.

On Sun, Jan 4, 2015 at 11:06 AM, overlookmotel notifications@github.com
wrote:

Hi.

This PR allows copy() to be called with the following signature:

fs.copy(src, dest, [options], callback)

The options object is passed to ncp. The original signature fs.copy(src,
dest, [filters], callback) still works as it checks for a function or
RexExp and if so treats it as a filter option. All tests pass.

My use case is wanting to pass in a transform function to ncp. Yes, OK, I
could just use ncp module direct, but I've got used to using fs-extra and I
like it!

I understand if you think this adds extra complexity and don't want it,
but please let me know either way, so I can publish a fork instead for my

own use if needs be.

You can merge this Pull Request by running

git pull https://github.com/overlookmotel/node-fs-extra copy-options

Or view, comment on, or merge it at:

#100
Commit Summary

  • copy: options object or filter to pass to ncp

File Changes

Patch Links:


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

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

jprichardson added a commit that referenced this pull request Jan 5, 2015
copy: options object or filter to pass to ncp
@jprichardson jprichardson merged commit 913a6fc into jprichardson:master Jan 5, 2015
@jprichardson
Copy link
Owner

@overlookmotel overlookmotel deleted the copy-options branch February 3, 2015 19:16
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

Successfully merging this pull request may close these issues.

None yet

2 participants