All pastes #57601 Raw Edit

Something

public text v1 · immutable
#57601 ·published 2006-05-21 15:11 UTC
rendered paste body
package picbase.grabber;

import java.util.*;
import java.sql.*;
import java.io.*;

public class PicbaseGrabber {

    private File rootPath = null;
    public List<String> picPaths = new ArrayList<String>();
    
    /* Constructor */
    public PicbaseGrabber( String root ) throws FileNotFoundException {
        
        /* verificate rootPath */
        File rootPath = new File( root );
    
        if ( !rootPath.exists() ) {

            System.out.println( "Der Pfad " + root + " existiert nicht!");
            throw new FileNotFoundException();
            
        } else {
            
            /* Set root path */
            this.picPaths.add( root );
            
        }
        
        
    }
    
    
    
}




package picbase.main;

import picbase.grabber.*;
import java.io.*;

public class Picbase {
    
    public static void main() {
        
        try {
        
            PicbaseGrabber grabber = new PicbaseGrabber( "/home/mimi/bilder/");
            
        } catch( FileNotFoundException e) {
            
            System.out.println( e.getMessage() );
            
        }
        
    }

}