Unix paths as bytes
Philip Jenvey
pjenvey at underboss.org
Sat May 2 15:35:21 PDT 2009
On May 2, 2009, at 4:21 AM, Alan Bateman wrote:
> Philip Jenvey wrote:
>> Can we allow access to UnixPath's byte representation of path names
>> and the reverse: the ability to create a Path object from said bytes?
> The only way currently to "export" or "import" as bytes is via URIs.
> When encoding as a URI the platform representation is used and
> characters that aren't legal in the URI path component are escaped.
> This gives you the round-trip but isn't exactly what you want in the
> String is a URI rather than a path. I'm not familar with the Python
> proposal but I will examine it - thanks for forwarding.
Another drawback to using toUri for this is it incurs an extra stat
call on most paths. That may or may not matter much, but lately JRuby
has noticed extra stats (compared to the C Ruby implementations) have
notably hurt their performance in some situations.
--
Philip Jenvey
More information about the nio-dev
mailing list