类 UFileCheck
java.lang.Object
com.gdxsoft.easyweb.utils.UFileCheck
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static booleanfileChanged(String filePath) Check whether the file is changed, do NOT check within 5 secondsstatic booleanfileChanged(String filePath, int spanSeconds) Check whether the file is changed, do NOT check within spanSeconds secondsstatic intgetFileCode(String filePath) Get the file status codestatic booleanisChanged(int fileCode, int statusCode, int spanSeconds) Check whether it has changed, the initial setting will return falsestatic booleanisHave(int fileCode) Check if the file exists according to the file codestatic booleanisOverTime(int fileCode, int spanSeconds) Check if the file is out of date according to the file codestatic voidPut the last check timestatic voidputTimeAndFileCode(Integer fileCode, Long time, Integer fileStatusCode) Put the file code and timestatic booleanRemove the file
-
构造器详细资料
-
UFileCheck
public UFileCheck()
-
-
方法详细资料
-
fileChanged
Check whether the file is changed, do NOT check within 5 seconds- 参数:
filePath- The file path and name- 返回:
- true =changed, false= no change
-
fileChanged
Check whether the file is changed, do NOT check within spanSeconds seconds- 参数:
filePath- The file path and namespanSeconds- The do not check seconds- 返回:
- true =changed, false= no change
-
getFileCode
Get the file status code- 参数:
filePath- The file path and name- 返回:
- the file status code
-
isChanged
public static boolean isChanged(int fileCode, int statusCode, int spanSeconds) Check whether it has changed, the initial setting will return false- 参数:
fileCode- The file pull path hash codestatusCode- status codespanSeconds- The do not check seconds- 返回:
- true =changed, false= no change
-
isHave
public static boolean isHave(int fileCode) Check if the file exists according to the file code- 参数:
fileCode- The file getAbsolutePath().hashCode()- 返回:
- true = yes, false = no
-
isOverTime
public static boolean isOverTime(int fileCode, int spanSeconds) Check if the file is out of date according to the file code- 参数:
fileCode- The file getAbsolutePath().hashCode()spanSeconds- The do not check seconds- 返回:
- true = yes, false = no
-
putTimeAndFileCode
Put the file code and time- 参数:
fileCode- The file getAbsolutePath().hashCode()time- The last check timefileStatusCode- The file status code
-
remove
Remove the file- 参数:
fileCode- The file getAbsolutePath().hashCode()- 返回:
- the remove result
-
putTime
Put the last check time- 参数:
fileCode- f1.getAbsolutePath().hashCode()t1- the last check time
-