Deletes a set of files to an output

@param array $files the files being written out
@return array array of results
7079
public function delete(array $files)
    {
        $filesystem = $this->getFilesystem($this->field, $this->settings);
        $results = [];
        foreach ($files as $path) {
            $results[] = $this->deletePath($filesystem, $path);
        }

        return $results;
    }
1344917
public function delete(array $keys) {
		if (count($keys) > 1) {
			return $this->connection->deleteMulti($keys);
		}
		return $this->connection->delete(current($keys));
	}
138177
public function remove($files)
    {
        foreach ($files as $file) {
            try {
                $this->filesystem->delete($file);
            }
            catch (Exception $e) {
                // Ignore not found exceptions
            }
        }
    }
724438
public function delete($paths) {
		$paths = is_array($paths) ? $paths : func_get_args();
		$success = true;

		foreach ($paths as $path) {
			try {
				if (! @unlink($path)) {
					$success = false;
				}
			} catch (Exception $e) {
				$success = false;
			}
		}
		return $success;
	}
97135
public function delete(array $keys) {
		foreach ($keys as $key) {
			if (!isset($this->_cache[$key])) {
				return false;
			}
			unset($this->_cache[$key]);
		}
		return true;
	}
614607
public function write(array $files)
    {
        $filesystem = $this->getFilesystem($this->field, $this->settings);
        $results = [];
        foreach ($files as $file => $path) {
            $results[] = $this->writeFile($filesystem, $file, $path);
        }

        return $results;
    }
355688
public function remove($files)
    {
        $files = iterator_to_array($this->toIterator($files));
        $files = array_reverse($files);
        foreach ($files as $file) {
            if (!file_exists($file) && !is_link($file)) {
                continue;
            }

            if (is_dir($file) && !is_link($file)) {
                $this->remove(new \FilesystemIterator($file));

                if (true !== @rmdir($file)) {
                    throw new \RuntimeException(sprintf('Failed to remove directory "%s".', $file), 0, null);
                }
            } else {
                // https://bugs.php.net/bug.php?id=52176
                if (defined('PHP_WINDOWS_VERSION_MAJOR') && is_dir($file)) {
                    if (true !== @rmdir($file)) {
                        throw new \RuntimeException(sprintf('Failed to remove file "%s".', $file), 0, null);
                    }
                } else {
                    if (true !== @unlink($file)) {
                        throw new \RuntimeException(sprintf('Failed to remove file "%s".', $file), 0, null);
                    }
                }
            }
        }
    }
860766
public function delete($paths)
	{
		$paths = is_array($paths) ? $paths : func_get_args();

		foreach ($paths as $path)
		{
			$this->driver->delete($path);
		}

		return true;
	}
1082469
public function prepare($files)
    {
        if (request()->has(static::FILE_DELETE_FLAG)) {
            return $this->destroy(request(static::FILE_DELETE_FLAG));
        }

        $targets = array_map([$this, 'prepareForeach'], $files);

        return array_merge($this->original(), $targets);
    }
240149
public function getRelatedFiles(array $files = [])
    {
        if (in_array($this->fileName, $files)) {
            return $files;
        }

        $files[] = $this->fileName;
        foreach ($this->properties as $property) {
            if (in_array($property->getType(), [Reflection\Property::TYPE_COLLECTION, Reflection\Property::TYPE_ENTITY])) {
                $files += self::load($property->getTypeOption())->getRelatedFiles($files);
            }
        }
        return $files;
    }
5836
protected function deleteFile($file)
    {
        if ($this->getParam('disk')) {
            return $this->file->deleteAll($file);
        }

        if (isset($file['file_id'])) {
            $file = $file['file_id'];
        }

        return $this->file->delete($file);
    }
493798
public function delete_many(array $keys) {
        $count = 0;
        foreach ($keys as $key) {
            if (!is_array($key)) {
                $key = array('key' => $key);
            }
            $key = $key['key'];
            if (isset($this->store[$key])) {
                $count++;
            }
            unset($this->store[$key]);
        }
        if ($this->maxsize !== false) {
            $this->storecount -= $count;
        }
        return $count;
    }
746651
public static function Exists($Files) {
      if (!is_array($Files))
         $Files = array($Files);

      $Return = FALSE;
      $Count = count($Files);
      for ($i = 0; $i < $Count; ++$i) {
         if (file_exists($Files[$i])) {
            $Return = $Files[$i];
            break;
         }
      }

      return $Return;
   }
1370628
public function remove($files)
    {
        if ($files instanceof \Traversable) {
            $files = iterator_to_array($files, false);
        } elseif (!is_array($files)) {
            $files = array($files);
        }
        $files = array_reverse($files);
        foreach ($files as $file) {
            if (is_link($file)) {
                // See https://bugs.php.net/52176
                if (!@(unlink($file) || '\\' !== DIRECTORY_SEPARATOR || rmdir($file)) && file_exists($file)) {
                    $error = error_get_last();
                    throw new IOException(sprintf('Failed to remove symlink "%s": %s.', $file, $error['message']));
                }
            } elseif (is_dir($file)) {
                $this->remove(new \FilesystemIterator($file, \FilesystemIterator::CURRENT_AS_PATHNAME | \FilesystemIterator::SKIP_DOTS));

                if (!@rmdir($file) && file_exists($file)) {
                    $error = error_get_last();
                    throw new IOException(sprintf('Failed to remove directory "%s": %s.', $file, $error['message']));
                }
            } elseif (!@unlink($file) && file_exists($file)) {
                $error = error_get_last();
                throw new IOException(sprintf('Failed to remove file "%s": %s.', $file, $error['message']));
            }
        }
    }
721892
public static function delete($files)
    {
        $files = (array) $files;

        foreach ($files as $file) {
            $file = Path::clean($file);

            // Try making the file writable first. If it's read-only, it can't be deleted
            // on Windows, even if the parent folder is writable
            @chmod($file, 0777);

            // In case of restricted permissions we zap it one way or the other
            // as long as the owner is either the webserver or the ftp
            // TODO: Remove exception and use PHP7 throwable
            if (@!unlink($file)) {
                throw new FilesystemException(__METHOD__ . ': Failed deleting ' . basename($file));
            }
        }

        return true;
    }
607083
private function SortFilesByVersion(array $files)
    {
        $result = array();
        $foreignKeysFile = '';
        foreach ($files as $file)
        {
            if ($file == 'foreign-keys.sql')
            {
                $foreignKeysFile = $file;
                continue;
            }
            $version = Path::RemoveExtension($file);
            if ($this->installedVersion && version_compare($version, $this->installedVersion) <= 0)
            {
                continue;
            }
            $result[$version] = $file;
        }
        uksort($result, "version_compare");
        if ($foreignKeysFile)
        {
            $result[] = $foreignKeysFile;
        }
        return $result;
    }
1046278
private function filterFile($files)
    {
        if (strpos($this->setting['ext'], '*') !== false) {
            return $files;
        }
        $exts = explode('|', $this->setting['ext']);

        foreach ($files as $field => &$file) {
            if (!isset($file['name'])) {
                continue;
            }
            $name = $file['name'];
            if (is_array($name)) {
                foreach ($name as $k => $v) {
                    $ext = $this->getExt($v);
                    if (!in_array($ext, $exts)) {
                        unset($file['name'][$k]);
                        unset($file['type'][$k]);
                        unset($file['tmp_name'][$k]);
                        unset($file['error'][$k]);
                        unset($file['size'][$k]);
                        $this->setError('500', $field . '字段中的' . $v . '文件不在允许的扩展名之内');
                    }
                }
            } else {
                $ext = $this->getExt($name);
                if (!in_array($ext, $exts)) {
                    unset($files[$field]);
                    $this->setError('500', $field . '字段中的' . $name . '文件不在允许的扩展名之内');
                }
            }
        }
        return $files;
    }