KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Exists


1 import jcifs.smb.SmbFile;
2
3 public class Exists {
4
5     public static void main( String JavaDoc argv[] ) throws Exception JavaDoc {
6
7         SmbFile f = new SmbFile( argv[0] );
8         if( f.exists() ) {
9             System.out.println( argv[0] + " exists" );
10         } else {
11             System.out.println( argv[0] + " does not exist" );
12         }
13     }
14 }
15
16
Popular Tags