SambaFileCharge.java
504 Bytes
package com.gimi.common.cinema.utils;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class SambaFileCharge {
public static boolean fileExist(String rootPath) {
boolean b;
ExecutorService exec = Executors.newCachedThreadPool();
b = TaskTimeout.execTask(exec, 400, rootPath); // 任务成功结束后等待计算结果,不需要等到15秒
exec.shutdown();
System.out.println("End!");
return b;
}
}