#NEWLINE# def _EntriesGenerator( self ) : #NEWLINE# #INDENT# 'Retrieves directory entries.\n\n    Since a directory can contain a vast number of entries using\n    a generator is more memory efficient.\n\n    Yields:\n      A path specification (instance of path.CPIOPathSpec).\n    ' #NEWLINE# location = getattr ( self . path_spec , 'location' , None ) #NEWLINE# if ( ( location is None ) or ( not location . startswith ( self . _file_system . PATH_SEPARATOR ) ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# cpio_archive_file = self . _file_system . GetCPIOArchiveFile ( ) #NEWLINE# for cpio_archive_file_entry in cpio_archive_file . GetFileEntries ( path_prefix = location [ 1 : ] ) : #NEWLINE# #INDENT# path = cpio_archive_file_entry . path #NEWLINE# if ( not path ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# ( _ , suffix ) = self . _file_system . GetPathSegmentAndSuffix ( location [ 1 : ] , path ) #NEWLINE# if ( suffix or ( cpio_archive_file == location ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# path_spec_location = self . _file_system . JoinPath ( [ path ] ) #NEWLINE# ( yield cpio_path_spec . CPIOPathSpec ( location = path_spec_location , parent = self . path_spec . parent ) )