String getFolderPath( String filePath ) { int index = filePath.lastIndexOf( '/' ); return filePath.substring( 0, index + 1 ); }