-
Notifications
You must be signed in to change notification settings - Fork 275
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 a means to convert a URI to a JimfsPath #70
Comments
And |
In other words, I'm a user of Jimfs and I would've liked to convert URIs with the |
For better or for worse, the design of the whole So, if you have a Alternatively, you can probably do If it doesn't, it might be that constructing a new URI like |
I see your point; the NIO API couples the default provider to the "file" scheme and it's quite hard to undo. Yeah, |
So I'm having an issue with creating a new URI from a path and I tried using I'm getting the following exception: I debugged the code and yes it does have a path that is not null. Why isn't this working? I thought as long as the path object is jimfs then I can create a new filesystem using that path object and everything should work as is. |
@o2themar You're getting that exception because you're calling The scheme for a zip file system is That said, you should be able to get a zip file system for a Jimfs path by just calling
|
@cgdecker I got to review this issue again with the recent activity, and I'm appalled at my previous behavior. I apologize for the demanding and combative tone. I really appreciate the work and effort you put into this! |
There is no obvious way to convert a URI into a
JimfsPath
. Normally, one could usefs.provider().getPath(uri)
, but this is not implemented byJimfsFileSystemProvider
; instead, it throws an exception stating:Which is funny, since on #12 @cgdecker (main contributor to the project?)
I would've used
JimfsFileSystem.toPath(URI)
, but the entire class is set to the package-private access modifier (why the hell?).The text was updated successfully, but these errors were encountered: