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

Add File.copyTo(File, is: File => InputStream, os: File => OutputStream) #75

Open
stacycurl opened this issue Aug 15, 2014 · 1 comment

Comments

@stacycurl
Copy link
Owner

No description provided.

@stacycurl
Copy link
Owner Author

Example usage

src.copyTo(dest)

// unzip whilst copying
src.copyTo(dest,
is = f => new GZipInputStream(new FileInputStream(f))
)

// zip whilst copying
src.copy(dest,
os = f => new GZipOutputStream(new FileOutputStream(f))
)

// be nice to do those like this:
src.copyTo(dest, is = inputStream.file >>> inputStream.buffer >>> inputStream.gzip)
src.copyTo(dest, os = outputStream.file >>> outputStream.buffer >>> outputStream.gzip)

// or better still
src.unzip.copyTo(dest)
src.copyTo(dest.zip)

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

1 participant