Clears the name of files; used while uploading attachments within XWiki

RECOMMENDED FOR NAMES OF UPLOADED FILES. (boolean stripDots = false;
boolean ascii = true;)
165259
public final static String clearName(String name)
    {
        boolean stripDots = false;
        boolean ascii = true;
        return clearName(name, stripDots, ascii);
    }
459237
public void cleanUp() {
    // Removing the entries from widgets.dat suffices. Opera will remove the other files.
    // These other files are:
    // widgets/xxx.oex
    // widgets/OEX_PATH_PREFIX/
    if (backupWidgetDat != null) {
      try {
        Files.move(backupWidgetDat, widgetsDat);
      } catch (IOException e) {
        throw new WebDriverException("Unable to restore widgets.dat");
      }
    } else {
      widgetsDat.delete();
    }
  }
1255378
public function clear() {
		foreach ($this->dirPath->getChildDirectories() as $nameDirPath) {
			$this->removeAll($nameDirPath->getName());	
		}
	}
544099
private function removeOldFiles()
    {
        if ($handle = opendir($this->uploadDir)) {

            while (false !== ($file = readdir($handle))) {
                if (is_file($file)) {
                    if (filectime($this->uploadDir . $file) < (time() - $this->fileHandleTime)) {
                        unlink($this->uploadDir . $file);
                    }
                }
            }
        }
    }
636397
def delete(name, attributes):
    '''
    
    '''
    ret = {'name': name,
           'result': True,
           'comment': '',
           'changes': {}}

    if not os.path.exists(name):
        ret['result'] = False
        ret['comment'] = "File or directory doesn't exist"
        return ret

    current_attrs = __salt__['xattr.list'](name)
    current_ids = current_attrs.keys()

    for attr in attributes:

        if attr in current_ids:
            __salt__['xattr.delete'](name, attr)
            ret['changes'][attr] = 'delete'

    if not ret['changes']:
        ret['comment'] = 'All attributes were already deleted.'

    return ret
1322815
public function clear()
    {
        if (null !== $this->aSkill) {
            $this->aSkill->removePicture($this);
        }
        $this->id = null;
        $this->title = null;
        $this->description = null;
        $this->url = null;
        $this->thumb_url = null;
        $this->skill_id = null;
        $this->photographer = null;
        $this->photographer_id = null;
        $this->athlete = null;
        $this->athlete_id = null;
        $this->uploader_id = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
1154955
@Override
  public void clear() {
    try {
      file.setLength(header.size());
    }
    catch(IOException e) {
      throw new RuntimeException(e);
    }
  }
437069
public function clearAll()
    {
        $path  = $this->getFilePath();
        $files = glob($path . '*' . $this->fileExtension);

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

        static::$keys = [];
    }
1200102
public function clear()
    {
        if (!empty($this->files)) {
            $fs = new FileSystem();
            foreach ($this->files as $file) {
                $fs->remove($file);
            }
        }
    }
909297
private static String removeWindowsTrailingDots(String fileName) {
        // machte unter Win noch Probleme, zB. bei dem Titel: "betrifft: ..."
        // "." und " " am Ende machen Probleme
        while (!fileName.isEmpty() && (fileName.endsWith(".") || fileName.endsWith(" "))) {
            fileName = fileName.substring(0, fileName.length() - 1);
        }
        return fileName;
    }
590813
private void clear() {
        boolPropertySet = null;
        databaseInputDir = null;
        databaseOutputDir = null;
        IO.close(project);
    }
393498
private static String stripFileExtensionIfAny(final String name) {
        final int suffix = name.lastIndexOf(".html");
        return suffix == -1 ? name : name.substring(0, suffix);
    }
1103969
public void clear() {
        this.setRemoteAddress(null).setLocalAddress(null).setFuture(null).setProviderSide(null)
            .setProviderInfo(null);
        this.attachments = new ConcurrentHashMap<String, Object>();
        this.stopWatch.reset();
    }
33267
public void clear() {
        valueBoxBase.setText("");
        clearStatusText();

        if (getPlaceholder() == null || getPlaceholder().isEmpty()) {
            label.removeStyleName(CssName.ACTIVE);
        }
    }
1368292
function clear() {
		$Finder = new \FilesystemIterator($this->dirname,
			\FilesystemIterator::KEY_AS_FILENAME
			| \FilesystemIterator::CURRENT_AS_FILEINFO
			| \FilesystemIterator::SKIP_DOTS);
		foreach ( $Finder as $key => $value ) {
			if ( pathinfo($key,PATHINFO_EXTENSION)=='json' ) {
				unlink($value->getRealPath());
			}
		}
	}
737851
private void clearEdit() {

        m_fileTable.setEditable(false);
        if (m_editItemId != null) {
            updateItem(m_editItemId, false);
        }
        m_editItemId = null;
        m_editProperty = null;
        m_editHandler = null;
        updateSorting();
    }
118759
public void clearSavedFields() {
    append = null;
    tokenToName = new LinkedHashMap<String, Navigation>();
    nameToToken = new LinkedHashMap<String, Navigation>();
    remainingMappings = new ArrayList<Navigation>();
  }