Clears all data from the data store permanently
544864
def clear(self):
        """"""
        for root, dirs, files in os.walk(self._root_dir, topdown=False):
            for file in files:
                os.unlink(os.path.join(root, file))
            os.rmdir(root)
        # Get the root dir back and re-initialise to start again
        root_dir = os.path.abspath(
            os.path.join(self._root_dir, os.pardir))
        self.__init__(root_dir)
357099
def cleanup_datastore(self):
    """"""
    print_header('CLEANING UP ENTIRE DATASTORE')
    kinds_to_delete = [u'Submission', u'SubmissionType',
                       u'DatasetImage', u'DatasetBatch',
                       u'AdversarialImage', u'AdversarialBatch',
                       u'Work', u'WorkType',
                       u'ClassificationBatch']
    keys_to_delete = [e.key for k in kinds_to_delete
                      for e in self.datastore_client.query_fetch(kind=k)]
    self._cleanup_keys_with_confirmation(keys_to_delete)
1248698
void clear() {
        // A VoltDB extension to diagnose ArrayOutOfBounds.
        if (linkTable != null) {
            voltDBclearCapacity = linkTable.length;
        }
        ++voltDBclearCount;
        voltDBlastClearEvent = voltDBhistoryDepth;
        // End of VoltDB extension

        int   to       = linkTable.length;
        int[] intArray = linkTable;

        while (--to >= 0) {
            intArray[to] = 0;
        }

        resetTables();
    }
1069180
def clear(self):
        
        self.name.clear()
        self.path.clear()
        self.generated = False
207580
def clear_data(self):
        
        if (self.get_data_metadata().is_read_only() or
                self.get_data_metadata().is_required()):
            raise errors.NoAccess()
        if self._my_map['data'] == self._data_default:
            return
        dbase = JSONClientValidated('repository',
                                    runtime=self._runtime).raw()
        filesys = gridfs.GridFS(dbase)
        filesys.delete(self._my_map['data'])
        self._my_map['data'] = self._data_default
        del self._my_map['base64']
807173
def clear_all(self):
        
        self._lock.acquire()
        try:
            self._cache = {}
            self._updated = False
        finally:
            self._lock.release()
977809
public final synchronized void clear()
	{
		timestamps = new long[max ? timestamps.length : STD_BUFSIZE];
		value = new CEMILData[timestamps.length];
		next = 0;
		size = 0;
	}
529034
public void clear() {
	column = new String[0];
	types = null;
	rows = new Vector();
	ncolumns = nrows = 0;
	atmaxrows = false;
    }
949018
public function clear()
    {
        $this->id = null;
        $this->mapuid = null;
        $this->name = null;
        $this->filename = null;
        $this->author = null;
        $this->environment = null;
        $this->mood = null;
        $this->bronzetime = null;
        $this->silvertime = null;
        $this->goldtime = null;
        $this->authortime = null;
        $this->copperprice = null;
        $this->laprace = null;
        $this->nblaps = null;
        $this->npcheckpoints = null;
        $this->maptype = null;
        $this->mapstyle = null;
        $this->created_at = null;
        $this->updated_at = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
735158
def clear_file_systems(self):
        """"""

        self._source_url = None
        self.dataset.config.library.source.url = None
        self._source_fs = None

        self._build_url = None
        self.dataset.config.library.build.url = None
        self._build_fs = None

        self.dataset.commit()
409572
public function clear()
    {
        $this->id = null;
        $this->code = null;
        $this->driver_code = null;
        $this->title = null;
        $this->serialized_configuration = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
437069
public function clearAll()
    {
        $path  = $this->getFilePath();
        $files = glob($path . '*' . $this->fileExtension);

        foreach ($files as $file)
        {
            @unlink($file);
        }

        static::$keys = [];
    }
1156740
def clearAll(self):
        
        # clear the tree information
        self.clear()
        
        # clear table information
        self._tableTypeName  = ''
        self._tableType      = None
        
        # clear the records information
        self._recordSet         = None
        self._currentRecordSet  = None
        
        # clear lookup information
        self._query             = None
        self._order             = None
        self._groupBy           = None
        
        # clear paging information
        
        if not self.signalsBlocked():
            self.recordsChanged.emit()
1150263
def clear(self):
        """"""

        if self.default_value is None:
            self.current_value = bytearray()
        else:
            self.current_value = bytearray(self.default_value)
294923
public function clear()
    {
        $now = Carbon::now('UTC');

        if ($handle = opendir(SettingsFile::TEMP_FOLDER)) {
            while (false !== ($file = readdir($handle))) {
                if ($file !== '.' && $file !== '..') {
                    $file_path = SettingsFile::TEMP_FOLDER . $file;
                    $file_time = filemtime($file_path);
                    $file_date = Carbon::createFromTimestamp($file_time, 'UTC');

                    if ($file_date->diffInDays($now) >= SettingsFile::OUTDATED_FILE_DAYS) {
                        @unlink($file_path);
                    }
                }
            }

            closedir($handle);
        }
    }
361984
@Override
	public void clear() {
		super.clear();

		// currentSchema = null;
		dataSets = new HashSet<>();
		generatedDaos = null;
		generatedEntities = null;
		globalDaoElements.clear();
		schemas = new LinkedHashSet<>();
	}
918279
def delete_all(self): 
        
        for record in self.find(using_name=False, data_only=True):
            res = self.delete_one(record["id"])