7029979: (fs) Path.toRealPath(boolean) should be toRealPath(LinkOption...)

Alan Bateman Alan.Bateman at oracle.com
Wed Mar 23 07:48:55 PDT 2011

Rémi Forax wrote:
> :
> MATCH_USER_HOME or MATCH_PWD. In that case, if the path is a subpath 
> of the path
> defined as user.home (or as pwd), toRealPath() will be done only on 
> the part after the user.home.
> So even if the user.home is defined using a link, toRealPath() will 
> keep that link.
The toRealPath method is intended to work like realpath(3C) (or File's 
getCanonicalFile for the case that the file exists). If I understand 
these examples correctly then they could be implemented using toRealPath 
and relativize. I think it be best not to burden this method with other 


More information about the nio-dev mailing list