Trouble understanding the meaning of the API
Marcel Ammerlaan
marcel-snoracle-nio at dyskolus.com
Wed Feb 3 14:30:17 PST 2010
Marcel Ammerlaan wrote:
> If I create a Path like this: Path p = Paths.get("/usr/bin/xset") and
> I do a getName() on it
> I get a Path again. The only use of this returned path is, in my
> opinion, the toString()
> method. This can also be seen as p.getName().toUri() returns the full
> URI to the original
> file, so the Path code is remembering both the full URI and the
> name-part of it.
>
Hmm, I need to read my own results better. The getName().toUri() gives
an absolute
path relative to the filsystem-root. Still: what's the point? If I use
"/usr/bin/xset" do
a getName() and get back a path "/home/username/xset" I do not see the
relevance.
Regards,
Marcel Ammerlaan.
More information about the nio-discuss
mailing list