类 UFileCheck

java.lang.Object
com.gdxsoft.easyweb.utils.UFileCheck

public class UFileCheck extends Object
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    static boolean
    fileChanged(String filePath)
    Check whether the file is changed, do NOT check within 5 seconds
    static boolean
    fileChanged(String filePath, int spanSeconds)
    Check whether the file is changed, do NOT check within spanSeconds seconds
    static int
    getFileCode(String filePath)
    Get the file status code
    static boolean
    isChanged(int fileCode, int statusCode, int spanSeconds)
    Check whether it has changed, the initial setting will return false
    static boolean
    isHave(int fileCode)
    Check if the file exists according to the file code
    static boolean
    isOverTime(int fileCode, int spanSeconds)
    Check if the file is out of date according to the file code
    static void
    putTime(Integer fileCode, Long t1)
    Put the last check time
    static void
    putTimeAndFileCode(Integer fileCode, Long time, Integer fileStatusCode)
    Put the file code and time
    static boolean
    remove(Integer fileCode)
    Remove the file

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • UFileCheck

      public UFileCheck()
  • 方法详细资料

    • fileChanged

      public static boolean fileChanged(String filePath)
      Check whether the file is changed, do NOT check within 5 seconds
      参数:
      filePath - The file path and name
      返回:
      true =changed, false= no change
    • fileChanged

      public static boolean fileChanged(String filePath, int spanSeconds)
      Check whether the file is changed, do NOT check within spanSeconds seconds
      参数:
      filePath - The file path and name
      spanSeconds - The do not check seconds
      返回:
      true =changed, false= no change
    • getFileCode

      public static int getFileCode(String filePath)
      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 code
      statusCode - status code
      spanSeconds - 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

      public static void putTimeAndFileCode(Integer fileCode, Long time, Integer fileStatusCode)
      Put the file code and time
      参数:
      fileCode - The file getAbsolutePath().hashCode()
      time - The last check time
      fileStatusCode - The file status code
    • remove

      public static boolean remove(Integer fileCode)
      Remove the file
      参数:
      fileCode - The file getAbsolutePath().hashCode()
      返回:
      the remove result
    • putTime

      public static void putTime(Integer fileCode, Long t1)
      Put the last check time
      参数:
      fileCode - f1.getAbsolutePath().hashCode()
      t1 - the last check time