VirtualFile file = // obtain VirtualFile object long timestamp = file.getTimeStamp(); System.out.println("Last modified timestamp: " + timestamp);
VirtualFile[] allFiles = // obtain an array of VirtualFile objects for (VirtualFile file : allFiles) { if (file.isDirectory()) { continue; } long timestamp = file.getTimeStamp(); System.out.println("File " + file.getName() + " was last modified at " + timestamp); }This example obtains an array of `VirtualFile` objects and iterates through them. For each file that is not a directory, it uses the `getTimeStamp()` method to get the last modified timestamp of the file. It then prints the name of the file and its timestamp to the console. The `com.intellij.openapi.vfs` package is a part of the IntelliJ Platform SDK, which is a library for developing plugins for the IntelliJ IDEA IDE.