Search
Categories
  ASP.NET
Visual C#
Visual Basic
.NET Framework
ADO.NET
AJAX
LINQ
Java
 
How To Rating
 
0.0 out of 5


Total Votes: 0
         
1 2 3 4 5
 




How to determine if a File or Directory exists in Java

Author: Waqas Anwar - Posted Date: 25-June-2009 - Category: Java   
Bookmark and Share
If you want to know about a particular File or Directory physically exists in File System you can use exists method of File class
File file = new File("D:\\Java\\Example.java");

if(file.exists())
{
   // File or Directory exist
}
else
{
   // File or Directory does not exist
}
LEAVE YOUR COMMENTS LEAVE YOUR COMMENTS
 Name (required)  
 Email (required
 Website


 

 


 
 
 

Categories

My Portfolio

Website Links


Copyright @ 2009 EzzyLearning.com