AutoCloseable or self-disposing temp files #140
mpollmeier
started this conversation in
Ideas
Replies: 2 comments 1 reply
-
|
I like the We could also add some convenience methods |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
here's a first attempt: #147 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For temp files/dirs we currently rely on the JVM's
deleteOnExitshutdown handler to remove them. That's not ideal though for a number of reasons, including:There's a variety of ways we could handle this better - two that come to mind immediately are
AutoCloseable, e.g. onPathor add a new typeTempPaththat does it. That way users can rely on things likescala.util.Using.usingabstraction, similar to what better-files does - see https://github.com/pathikrit/better-files#temporary-filesAny thoughts on this?
Beta Was this translation helpful? Give feedback.
All reactions