1.2.1 • Published 8 years ago

fs-copy-simple v1.2.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

fs-copy-simple

Exceptionally simple module to just copy-the-damn-file. No globs, no weirdness, just copy.

Pretty much everything that is not a valid input and output file name will callback with an error.

Written in frustration that all NPM copy libraries seem to spend an inordinate amount of time doing complex globbing and other fluff. If you want entire directory tree copying either use a higher level library such as fs-extra or couple this module with something that can recuse like file-emitter.

copy('/something/somewhere.thing', '/something/somewhere.else', function(err) {
	console.log('Copied with error:', err);
});

copy(src, dst, callback)

Pass in a source path (or buffer), a destination path (or directory) and a callback for errors. Thats it.

This function will error on non-existant files, trying to copy a directory to another directory or pretty much anything thats not a valid source file to either a destination path OR a directory to copy into.

1.2.1

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago