public class FileChangedChecker extends Object
| Constructor and Description |
|---|
FileChangedChecker(File file)
Creates the file change checker instance.
|
FileChangedChecker(String fileName)
Creates the file change checker instance.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getFileName()
Gets the file name being checked.
|
boolean |
hasChanged()
Checks if the file has changed.
|
boolean |
isNewerThan(File file)
Checks if this file is newer than the one specified.
|
boolean |
isNewerThan(String fileName)
Checks if this file is newer than the one specified.
|
long |
lastModified()
Returns the time that the file denoted by this abstract pathname was last modified.
|
long |
length()
Returns the length of the file denoted by this abstract pathname.
|
void |
update()
Requests an update of the file size and last modification time, if the file has been changed.
|
public FileChangedChecker(File file)
public FileChangedChecker(String fileName)
public String getFileName()
public boolean hasChanged()
public void update()
public long lastModified()
public long length()
public boolean isNewerThan(File file)
file - The file to compare last modified time with.public boolean isNewerThan(String fileName)
file - The file to compare last modified time with.Phantom® and NetPhantom® are registered trademarks of Nexum Technologies SARL.
© Copyright Nexum Technologies SARL, 2011. All rights reserved.