Ext2DirectoryRecord dr; Ext2FileSystem fs = (Ext2FileSystem) getFileSystem(); do { if(index>=iNode.getSize()) return false;  dr = new Ext2DirectoryRecord(fs, data, index, index); index+=dr.getRecLen(); } while(dr.getINodeNr()==0);
Ext2DirectoryRecord dr=null; Ext2FileSystem fs = (Ext2FileSystem) getFileSystem(); try{ do { if(index>=iNode.getSize()) return false;  dr = new Ext2DirectoryRecord(fs, data, index, index); index+=dr.getRecLen(); } while(dr.getINodeNr()==0); }catch(Exception e){ fs.handleFSError(e); return false; }
		public boolean hasNext() {			Ext2DirectoryRecord dr;			Ext2FileSystem fs = (Ext2FileSystem) getFileSystem();						do {				if(index>=iNode.getSize())					return false;								dr = new Ext2DirectoryRecord(fs, data, index, index);				index+=dr.getRecLen();				} while(dr.getINodeNr()==0);			//inode nr=0 means the entry is unused			current = dr;			return true;		}