How to find out if a file belong to me?

Weijun Wang weijun.wang at oracle.com
Tue Feb 5 15:35:08 UTC 2013


Maybe comparing Files.getAttribute(p, "unix:uid") and 
UnixSystem().getUid()? Is there a cross-platform way?

I noticed Files.getOwner(), but seems UserPrincipal has no method of its 
own and all its implementation classes are non public.

Thanks
Max



More information about the core-libs-dev mailing list