(self, path)
Return tuple of two element
            items  sorted list of filenames in path, or empty list
            error  exception message, or empty string
Return tuple of two element
            items  sorted list of filenames in path, or empty list
            error  exception message, or empty string
Return tuple of two element items sorted list of filenames in path or empty list error exception message or empty string
def try_listing_directory(self, path):
        '''Return tuple of two element
            items  sorted list of filenames in path, or empty list
            error  exception message, or empty string
        '''
        items, error = [], ''
        try:
            if not self.show_hidden:
                items = [name for name in os.listdir(path) if not self.is_hidden(name, path)]
            else:
                items = os.listdir(path)
        except OSError as e:
            error = str(e)
            if NT:
                error = error.split(':')[0].replace('[Error 5] ', 'Access denied').replace('[Error 3] ', 'Not exists, press r to refresh')
            if not ST3 and LIN:
                error = error.decode('utf8')
        else:
            sort_nicely(items)
        finally:
            return items, error
def try_listing_directory ( self , path ) : items , error = [ ] , '' try : if not self . show_hidden : items = [ name for name in os . listdir ( path ) if not self . is_hidden ( name , path ) ] else : items = os . listdir ( path ) except OSError as e : error = str ( e ) if NT : error = error . split ( ':' ) [ 0 ] . replace ( '[Error 5] ' , 'Access denied' ) . replace ( '[Error 3] ' , 'Not exists, press r to refresh' ) if not ST3 and LIN : error = error . decode ( 'utf8' ) else : sort_nicely ( items ) finally : return items , error