rendered paste bodypackage 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() );
}
}
}