Deletes the selected files from storage
18828
def save(self):
        
        storage = get_media_storage()
        for storage_name in self.cleaned_data['selected_files']:
            full_path = storage.path(storage_name)
            try:
                storage.delete(storage_name)
                self.success_files.append(full_path)
            except OSError:
                self.error_files.append(full_path)
1114735
@Override
	public void discardState() throws Exception {
		FileSystem fs = getFileSystem();
		fs.delete(filePath, false);
	}
296301
def cleanup(self):
        """"""
        for file in glob.glob(self.basename + '*'):
            os.unlink(file)
1076953
private void deleteFiles(Predicate<File> predicate) {
    directory.mkdirs();

    // Iterate through all files in the storage directory.
    for (File file : directory.listFiles(f -> f.isFile() && predicate.test(f))) {
      try {
        Files.delete(file.toPath());
      } catch (IOException e) {
        // Ignore the exception.
      }
    }
  }
1210071
function() {
        var items = _utils.getArgArray(arguments);
        if (items.length === 0) {
            throw new Error('no files specified to clean up');
        }
        items.forEach(function(item) {
            try {
                var path = (typeof item === 'string') ? item : item.path;
                _fs.unlinkSync(path);
            } catch (e) {
                // Eat the exception.
            }
        });
    }
606102
public function remove()
    {
        $this->debug->groupCollapsed(__METHOD__);
        $name = $this->data['name'];
        $this->trashCollectFiles($this->data);
        $this->data = array();
        unset($_SESSION['form_persist'][$name]);
        if (empty($_SESSION['form_persist'])) {
            unset($_SESSION['form_persist']);
        }
        $this->debug->groupEnd();
    }
328433
function remove()
    {
        $path = $this->path();
        if ( file_exists( $path ) )
        {
            eZDir::recursiveDelete( $path );
        }
        $this->setInstalled( false );
    }
353324
public function delete() {
        if ($this->_oldFile != $this->path . $this->name) {
            unlink($this->_oldFile);
        }

        unlink($this->path . $this->name);
    }
226595
public function deleteAll()
    {
        try {
            array_map('unlink', glob($this->filePath('*')));
        } catch (\Exception $e) {
            return false;
        }
        $this->storage = [];
        return true;
    }
760810
def delete_files!(dir)
      File.delete(to_path) while setup_path(dir) && File.exist?(to_path)
    end
92199
protected function removeFiles()
    {
        $generator = $this->getFilenameOption();
        $pattern = $this->cacheDir . DIRECTORY_SEPARATOR . $generator('*');

        $objects = new GlobIterator($pattern);

        foreach ($objects as $object) {
            unlink($object);
        }
    }
1208120
public function deleteFiles()
    {
        $files = [];
        foreach ([
            DIR_CONFIG_SITE . '/site_install.php',
            DIR_CONFIG_SITE . '/site_install_user.php',
        ] as $file) {
            if ($this->filesystem->isFile($file)) {
                OpCache::clear($file);
                $files[] = $file;
            }
        }
        if (!empty($files)) {
            $this->filesystem->delete($files);
        }
    }
584724
private void cleanup() {

        m_folder1Exclusive = null;
        m_folder2Exclusive = null;
        m_foldersSibling = null;
        m_foldersEqualnames = null;
        m_foldersDifferenttypes = null;
    }
164012
public function clear()
    {
        $this->allowed_file_extensions = null;
        $this->error_messages = array();
        $this->file_extensions_mime_types = null;
        $this->files = array();
        $this->input_file_name = null;
        $this->max_file_size = null;
        $this->max_image_dimensions = array();
        $this->move_uploaded_queue = array();
        $this->move_uploaded_to = '.';
        $this->new_file_name = null;
        $this->overwrite = false;
        $this->web_safe_file_name = true;
        $this->security_scan = false;
        $this->stop_on_failed_upload_multiple = true;
    }
916961
def delete(self):
        """"""
        if self.filename == ':memory:':
            return True
        try:
            os.remove(self.filename)
            return True
        except OSError:
            return False
2993
public void cleanup() {
        if (this.childStorages != null) {
            for (FileTempStorage storage : this.childStorages) {
                storage.cleanup();
            }
        }

        for (File file : this.files.values()) {
            FileUtils.deleteQuietly(file);
        }
        this.files.clear();
    }
753052
public void delete() {
    try {
      Files.deleteIfExists(file.file().toPath());
    } catch (IOException e) {
      throw new StorageException(e);
    }
  }