public static FunctionLib [ ] loadFromDirectory ( Resource dir , Identification id ) throws FunctionLibException { if ( ! dir . isDirectory ( ) ) return new FunctionLib [ 0 ] ; ArrayList < FunctionLib > arr = new ArrayList < FunctionLib > ( ) ; Resource [ ] files = dir . listResources ( new ExtensionResourceFilter ( new String [ ] { "fld" , "fldx" } ) ) ; for ( int i = 0 ; i < files . length ; i ++ ) { if ( files [ i ] . isFile ( ) ) arr . add ( FunctionLibFactory . loadFromFile ( files [ i ] , id ) ) ; } return arr . toArray ( new FunctionLib [ arr . size ( ) ] ) ; }
Laedt mehrere FunctionLib s die innerhalb eines Verzeichnisses liegen .