Hello Kazuho Fujii. Thank you for the patch. This looks good overall, and I've verified that it's fine on Windows.
Before we commit this, I'd like to make sure that symlinks are handled correctly. In java.nio.file, symlinks are followed by default, unless the caller passes LinkOption#NOFOLLOW_LINKS. I haven't been able to find documentation that clearly states the contractual behavior for java.io.File.
I think the important thing for Hadoop is to remain backwards-compatible with current behavior. That means that we'd need to make sure mtime is populated the same way before and after this change when symlinks are present. For atime, the logic should be equivalent.
A few specific cases I can think of:
- The client calls RawLocalFileSystem#getFileLinkStatus, indicating that they want information on the link itself instead of its target.
- The argument is a symlink pointing to a directory.
- The argument is a symlink pointing to a file.
- The argument is a dangling symlink (target does not exist).
It would be great if we could have test cases for each of these, then apply the RawLocalFileSystem changes, and then verify that thoses tests continue to pass.