How to get file last modified date in Java
In Java, we can use Files.readAttributes() to get the file metadata or attribute, and then lastModifiedTime() to display the last modified date of a file. For legacy IO, we can…
Favourite tutorials for developers
In Java, we can use Files.readAttributes() to get the file metadata or attribute, and then lastModifiedTime() to display the last modified date of a file. For legacy IO, we can…
In Java, we can use the NIO Files.setLastModifiedTime(path, FileTime) to update the last modified date or time of a file. For legacy IO java.io.File, we can use File.setLastModified() to update…
The Files.walk API is available since Java 8; it helps to walk a file tree at a given starting path. Examples: list all files, list all folders or directories, find…