@param string|array $files

@return static
166798
public function registerFiles($files)
    {
        foreach ((array)$files as $file) {
            if (isset($this->_files[$file])) {
                continue;
            }

            if ($file[0] === '@') {
                $file = Di::getDefault()->getShared('alias')->resolve($file);
            }
            $this->_files[$file] = 1;

            /** @noinspection PhpIncludeInspection */
            require $file;
        }

        return $this;
    }
984969
private function uploadMore(array $files)
    {
        $res = [];
        foreach ($files as $file) {
            $result = $this->uploadOne($file);
            $res[] = $result;
        }
        return $res;
    }
151296
protected function resolveLocalGlobPath(array $files)
    {
        $absoluteFiles  = $this->resolveFullPath($files);
        $expandedFiles  = array();
        foreach ($absoluteFiles as $absoluteFile) {
            $globResult     = glob($absoluteFile);
            if (   empty($globResult)
                && stripos($absoluteFile, '*') === false
                && !file_exists($absoluteFile)
            ) {
                $expandedFiles[]    = $absoluteFile;
            } else {
                $expandedFiles  = array_merge($expandedFiles, $globResult);
            }
        }
        return $this->resolveLocalPath($expandedFiles);
    }
1192099
public function addFile(\Haven\CoreBundle\Entity\File\File $files)
    {
        $this->files[] = $files;

        return $this;
    }
271622
public function addFiles(array $files)
    {
        $added_files = 0;
        try {
            foreach ($files as $localName => $filename) {
                if (!is_null($filename)) {
                    $this->sevenZip->addEntry($filename);
                    $this->sevenZip->renameEntry($filename, $localName);
                    $added_files++;
                }
            }
        } catch (Exception $e) {
            throw new Exception('Could not modify archive: '.$e->getMessage(), $e->getCode(), $e);
        }
        return $added_files;
    }
730029
public function setMerged(array $files)
    {
        if (!empty($files)) {
            foreach ($files as $_file) {
                $this->addMerged($_file);
            }
        }
        return $this;
    }
1295210
public function setFiles(array $files)
    {
        $this->files = array();
        foreach ($files as $key => $file) {
            if (!is_array($file)) {
                $file = array('content' => $file);
            }

            $file = array_merge(array(
                'content' => null,
                'mtime' => null,
            ), $file);

            $this->setFile($key, $file['content'], $file['mtime']);
        }
    }
1179985
public function requireFiles(array $files)
    {
        $path = $this->getPath();
        foreach ($files as $file) {
            $this->laravel['files']->requireOnce($path . '/' . $file . '.php');
        }
    }
530323
final protected function filterFileInput(array $files)
    {
        // Cache method calls
        static $filter = null;

        if ($filter === null) {
            $filter = new NameFilter(new UniqueType());
        }

        // By reference anyway
        $filter->filter($files);
    }
200920
public static function readWords(array $files)
    {
        $words = [];
        foreach ($files as $file) {
            $words = array_merge($words, file($file, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES));
        }

        $types = [];

        for ($i = 0, $count = count($words); $i !== $count; ++$i) {
            $type = 1;
            $value = trim($words[$i]);

            // Reserved, data types, keys, functions, etc. keywords.
            foreach (static::$LABELS_FLAGS as $label => $flags) {
                if (strstr($value, $label) !== false) {
                    $type |= $flags;
                    $value = trim(str_replace($label, '', $value));
                }
            }

            // Composed keyword.
            if (strstr($value, ' ') !== false) {
                $type |= 2; // Reserved keyword.
                $type |= 4; // Composed keyword.
            }

            $len = strlen($words[$i]);
            if ($len === 0) {
                continue;
            }

            $value = strtoupper($value);
            if (! isset($types[$value])) {
                $types[$value] = $type;
            } else {
                $types[$value] |= $type;
            }
        }

        $ret = [];
        foreach ($types as $word => $type) {
            $len = strlen($word);
            if (! isset($ret[$type])) {
                $ret[$type] = [];
            }
            if (! isset($ret[$type][$len])) {
                $ret[$type][$len] = [];
            }
            $ret[$type][$len][] = $word;
        }

        return static::sortWords($ret);
    }
33810
public function decodeFiles(array $files)
    {
        // combine into one document.
        //
        $suiteDocument = new Document('phpbench');
        $rootEl = $suiteDocument->createRoot('phpbench');

        foreach ($files as $file) {
            $fileDom = new Document();
            $fileDom->load($file);

            foreach ($fileDom->query('./suite') as $suiteEl) {
                $importedEl = $suiteDocument->importNode($suiteEl, true);
                $rootEl->appendChild($importedEl);
            }
        }

        return $this->decode($suiteDocument);
    }
606318
public function setFiles(array $files)
    {
        foreach($files as $file) {
            if (!$file instanceof File) {
                throw new ObjectNotAFileException($file . ' is not a file');
            }
        }

        $this->files = $files;
        return $this;
    }
316714
protected function getFilePayload(?array $files) : ?array
    {
        if (empty($files)) {
            return null;
        }

        $files = array_filter($files, function($file) {
            return $file instanceof ResourceSettings || (isset($file['key']) && isset($file['filename']));
        });

        return $files;
    }
734121
public function setFiles($files = array())
    {
        if (count($files) === 0) {
            $this->_files = $_FILES;
        } else {
            $this->_files = $files;
        }

        foreach($this->_files as $file => $content) {
            if (!isset($content['error'])) {
                unset($this->_files[$file]);
            }
        }

        return $this;
    }
1358817
public function ignoreFiles($files) {
		if (! is_array ( $files )) {
			$files = func_get_args ();
		}
		$this->begin ();
		$this->run ( 'git reset', NULL, [ "--" => $files ] );
		return $this->end ();
	}
641234
public function set(array $files)
    {
        if (!empty($files)) {
            foreach ($files as $_file) {
                $this->add($_file);
            }
        }
        return $this;
    }
1345206
protected function filter($files) {
		foreach ($files as $i => $file) {
			if (!empty($file['hidden']) || !$this->default->mimeAccepted($file['mime'])) {
				unset($files[$i]);
			}
		}
		return array_merge($files, array());
	}