/** Wether there was an error. */
private boolean error = false;
+ /** The name of the last file scanned. */
+ private String lastFilename;
+
/**
* Creates a new file scanner for the given project.
*
}
/**
+ * Returns the name of the last file scanned.
+ *
+ * @return The name of the last file scanned, or {@code null} if there was
+ * no file scanned yet
+ */
+ public String getLastFilename() {
+ return lastFilename;
+ }
+
+ /**
* {@inheritDoc}
* <p>
* Scans all available files in the project’s local path and emits an event
public void run() {
files = new ArrayList<ScannedFile>();
error = false;
+ lastFilename = null;
try {
scanFiles(new File(project.getLocalPath()), files);
Collections.sort(files);
String filename = project.shortenFilename(file).replace('\\', '/');
String hash = hashFile(project.getLocalPath(), filename);
fileList.add(new ScannedFile(filename, hash));
+ lastFilename = filename;
}
}