public List < String > list ( String folder ) throws IOException { List < String > res = new ArrayList < String > ( ) ; if ( path != null ) { File f = new File ( Utilities . path ( path , folder ) ) ; if ( f . exists ( ) && f . isDirectory ( ) ) for ( String s : f . list ( ) ) res . ( s ) ; } else { for ( String s : content . keySet ( ) ) { if ( s . startsWith ( folder + "/" ) && ! s . substring ( folder . length ( ) + 2 ) . contains ( "/" ) ) res . add ( s . substring ( folder . length ( ) + 1 ) ) ; } } return res ; }
Accessing the contents of the package - get a list of files in a subfolder of the package