#NEWLINE# def _GetStat( self ) : #NEWLINE# #INDENT# 'Retrieves the stat object.\n\n    Returns:\n      The stat object (instance of vfs.VFSStat).\n\n    Raises:\n      BackEndError: when the CPIO archive file entry is missing in\n                    a non-virtual file entry.\n    ' #NEWLINE# cpio_archive_file_entry = self . GetCPIOArchiveFileEntry ( ) #NEWLINE# if ( ( not self . _is_virtual ) and ( cpio_archive_file_entry is None ) ) : #NEWLINE# #INDENT# raise errors . BackEndError ( 'Missing CPIO archive file entry in non-virtual file entry.' ) #NEWLINE# #UNINDENT# stat_object = vfs_stat . VFSStat ( ) #NEWLINE# stat_object . size = getattr ( cpio_archive_file_entry , 'data_size' , None ) #NEWLINE# stat_object . mtime = getattr ( cpio_archive_file_entry , 'modification_time' , None ) #NEWLINE# mode = getattr ( cpio_archive_file_entry , 'mode' , 0 ) #NEWLINE# stat_object . mode = stat . S_IMODE ( mode ) #NEWLINE# stat_object . uid = getattr ( cpio_archive_file_entry , 'user_identifier' , None ) #NEWLINE# stat_object . gid = getattr ( cpio_archive_file_entry , 'group_identifier' , None ) #NEWLINE# if stat . S_ISLNK ( mode ) : #NEWLINE# #INDENT# stat_object . type = stat_object . TYPE_LINK #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . _is_virtual or stat . S_ISDIR ( mode ) ) : #NEWLINE# #INDENT# stat_object . type = stat_object . TYPE_DIRECTORY #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if stat . S_ISREG ( mode ) : #NEWLINE# #INDENT# stat_object . type = stat_object . TYPE_FILE #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( stat . S_ISCHR ( mode ) or stat . S_ISBLK ( mode ) ) : #NEWLINE# #INDENT# stat_object . type = stat_object . TYPE_DEVICE #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if stat . S_ISFIFO ( mode ) : #NEWLINE# #INDENT# stat_object . type = stat_object . TYPE_PIPE #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if stat . S_ISSOCK ( mode ) : #NEWLINE# #INDENT# stat_object . type = stat_object . TYPE_SOCKET #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return stat_object