Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (!new File("D:\Log\Sample").exists())
- {
- throw new FileNotFoundException("Yikes!");
- }
- File f = new File("....");
- if (!f.exists()) {
- // The directory does not exist.
- ...
- } else if (!f.isDirectory()) {
- // It is not a directory (i.e. it is a file).
- ...
- }
Add Comment
Please, Sign In to add comment