7029979: (fs) Path.toRealPath(boolean) should be toRealPath(LinkOption...)
Rémi Forax
forax at univ-mlv.fr
Wed Mar 23 07:24:41 PDT 2011
On 03/23/2011 03:16 PM, Alan Bateman wrote:
> Rémi Forax wrote:
>>
>> In my opinion, you should decouple LinkOption from the type used in
>> toRealPath
>> to allow to specify any other options (not only link options).
>> I propose to introduce PathResolverOption as a supertype of LinkOption
>> with toRealPath declared toRealPath(PathResolverOption... options).
> Do you have other examples in mind? I'd prefer not introduce another
> type for this and I'm wondering if these other examples are really
> something toRealPath should be supporting or not.
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.
>
> -Alan
Rémi
More information about the nio-dev
mailing list