support for URL/URI Paths?
Per Bothner
per at bothner.com
Mon Jan 26 16:07:39 PST 2009
For Kawa I implmented a Path class to abstract out the
differences between java.io.File, java.net.URL and java.net.URI,
and provide a common clean API for them:
http://www.gnu.org/software/kawa/api/gnu/text/Path.html
Others have done the same - both KDE and Gnome have a "virtual
file" abstraction, based on URLs.
It seems like java.nio.file.Path provides much of the needed
functionality, but it seems aimed mostly at traditional files.
It would be really nice if there were a way to create a Path
from an arbitrary URL,without first having to create and
register a FileSystem. Lots of the hooks are there, but it
really would be nice if the functionality was provided.
Of course a URL in general doesn't support all the operations
one might expect from a File - for example you can seek it,
or list the entries in a directory.
--
--Per Bothner
per at bothner.com http://per.bothner.com/
More information about the nio-discuss
mailing list