RFE: provide an efficient way to retrieve Unix ctime (changed-time)
Alan Bateman
Alan.Bateman at oracle.com
Thu Oct 12 13:25:41 UTC 2017
On 12/10/2017 13:38, Marc Strapetz wrote:
> During a Files.walkFileTree(), UnixFileAttributes seem to be populated
> with all available file system information, especially st_ctime_sec
> and st_ctime_nsec, but currently there is no way to access this
> information (except of using reflection-based hacks).
>
> As suggested in a comment by Alan Bateman on stackoverflow.com[1],
> this information could be made available directly through
> PosixFileAttributes.
>
Right, there's no type safe way to get this through the standard API
although it can be obtained by attribute name using
Files.getAttribute(file, "unix:ctime").
As noted, it could potentially be exposed by PosixFileAttributes if
there was a compelling reason, it just hasn't been important to date.
-Alan
More information about the nio-dev
mailing list