目录
代码语言:javascript复制 //判断文件是否还在更新
long oldLength;
long newLength;
do {
oldLength = new File(dataPath).length();
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
e.printStackTrace();
}
newLength = new File(dataPath).length();
log.info("File Uploading >>" dataPath ": " newLength);
} while (oldLength != newLength);