http://www.exampledepot.com/egs/java.io/Exists.html
boolean exists = (new File("filename")).exists();
if (exists) {
// File or directory exists
} else {
// File or directory does not exist
}
http://docs.oracle.com/javase/1.4.2/docs/api/java/io/File.html#exists()
http://docs.oracle.com/javase/1.5.0/docs/api/java/io/File.html#exists()
'Programming' 카테고리의 다른 글
Java Decompiler jad 이클립스와 연동 (0) | 2012.07.05 |
---|---|
(C++) Uniform random number between [0.1) (0) | 2012.07.05 |
(Java) Computing Elapsed Time (0) | 2012.07.03 |
Learn Objective-C (0) | 2012.07.03 |
java zip압축 하기/풀기 (0) | 2012.07.03 |