labpack/storage/appdata.py
def exists(self, record_key):
        
        ''' 
            a method to determine if a record exists in collection

        :param record_key: string with key of record
        :return: boolean reporting status
        '''
        
        title = '%s.exists' % self.__class__.__name__
    
    # validate inputs
        input_fields = {
            'record_key': record_key
        }
        for key, value in input_fields.items():
            object_title = '%s(%s=%s)' % (title, key, str(value))
            self.fields.validate(value, '.%s' % key, object_title)
    
    # construct path to file
        from os import path
        file_path = path.join(self.collection_folder, record_key)

    # validate existence of file
        if not path.exists(file_path):
            return False
        return True
 
            a method to determine if a record exists in collection

        :param record_key: string with key of record
        :return: boolean reporting status
        
a method to determine if a record exists in collection
a method to determine if a record exists in collection
def exists(self, record_key):
        title = '%s.exists' % self.__class__.__name__
        input_fields = {
            'record_key': record_key
        }
        for key, value in input_fields.items():
            object_title = '%s(%s=%s)' % (title, key, str(value))
            self.fields.validate(value, '.%s' % key, object_title)
        from os import path
        file_path = path.join(self.collection_folder, record_key)
        if not path.exists(file_path):
            return False
        return True
def exists ( self , record_key ) : title = '%s.exists' % self . __class__ . __name__ input_fields = { 'record_key' : record_key } for key , value in input_fields . items ( ) : object_title = '%s(%s=%s)' % ( title , key , str ( value ) ) self . fields . validate ( value , '.%s' % key , object_title ) from os import path file_path = path . join ( self . collection_folder , record_key ) if not path . exists ( file_path ) : return False return True
a method to determine if a record exists in collection
a method to determine if a record exists in collection
''' 
            a method to determine if a record exists in collection

        :param record_key: string with key of record
        :return: boolean reporting status
        ''' # validate inputs
 # construct path to file
 # validate existence of file

boolean reporting status
boolean reporting status
self
record_key
string with key of record
string with key of record