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

ZIO Streams 2.0: Utilities for non-Path-based files #5631

Closed
jdegoes opened this issue Sep 17, 2021 · 3 comments
Closed

ZIO Streams 2.0: Utilities for non-Path-based files #5631

jdegoes opened this issue Sep 17, 2021 · 3 comments
Labels

Comments

@jdegoes
Copy link
Member

jdegoes commented Sep 17, 2021

Path may be the best way to denote paths in modern Java, but File is still around, and String is more convenient than both. I think we should overload constructors that take Path to also take File and String, purely for ease-of-use. This pattern is common in Java and also Scala (e.g. scala.io.Source).

@adamgfraser
Copy link
Contributor

I don't think we can overload if we are using default arguments which we do in the ZStream constructors for chunkSize. Perhaps we could have a naming convention like fromPath, fromFile, fromFileString? Or perhaps this is another push to developer a more compositional solution to the chunking problem.

@adamgfraser adamgfraser self-assigned this Sep 17, 2021
@ghost
Copy link

ghost commented Dec 9, 2021

@jdegoes @adamgfraser Can I do this?

@adamgfraser
Copy link
Contributor

@NavidKJalali Sure!

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

No branches or pull requests

3 participants