Include PHP files containing resources in the given filename globs
@paramstr[] $filenames Array of filename globs
513949
private function loadResourceFiles($filenames)
    {
        if (!is_array($filenames)) {
            $filenames = array($filenames);
        }

        foreach ($filenames as $glob) {
            $globs = glob(str_replace('[', '[[]', $glob));
            if ($globs) {
                foreach ($globs as $filename) {
                    require_once $filename;
                }
            }
        }
    }
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']);
        }
    }
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);
    }
437018
function filesFromFileSet (dirname, fileset) {
  if (!fileset.includes || !fileset.includes.length) {
    return [];
  }
  return fileset.includes
    .filter(include => !glob.hasMagic(include))
    .map(include => path.join(dirname, include));
}
1357369
function setfs( $paths ) {
		if ( ! is_array($paths) )
			$paths = explode( "\n", $paths );

		$paths = array_filter( array_map( 'trim', $paths ) );

		foreach ( $paths as $path ) {
			// Allow for comments
			if ( '#' == $path[0] )
				continue;

			// Directories
			if ( '/' == $path[ strlen($path) -1 ] )
				$this->mkdir( $path );
			else // Files (with dummy content for now)
				$this->put_contents( $path, 'This is a test file' );
		}

	}
731643
private function loadFiles(array $configFiles, ContainerBuilder $container)
    {
        $loader = new YamlFileLoader($container, new FileLocator($this->getConfigFilesLocation()));

        foreach ($configFiles as $configFile) {
            if (is_array($configFile)) {
                if (isset($configFile[1]) && false === $configFile[1]) {
                    continue;
                }

                $configFile = $configFile[0];
            }

            $loader->load($configFile.'.yml');
        }
    }
74955
public function javascriptIncludeTag($filename, $attributes)
    {
        $webPaths = array();
        $absolutePaths = $this->parser->javascriptFiles($filename);

        foreach ($absolutePaths as $absolutePath)
        {
            $webPaths[] = $this->parser->absolutePathToWebPath($absolutePath);
        }

        $config = $this->getConfig();
        $composer = $config['javascript_include_tag'];

        return $composer->process($webPaths, $absolutePaths, $attributes);
    }
1730
public static function createFromFilesGlobal(array $files) : array
    {
        $items = [];
        $files = self::normalizeSuperglobal($files);
        self::buildMap($files, $items);

        return $items;
    }
1243339
protected function loadMigrations(array $files, ?string $namespace) : array
    {
        $includedFiles = [];
        foreach ($files as $file) {
            static::requireOnce($file);

            $realFile = realpath($file);
            assert($realFile !== false);

            $includedFiles[] = $realFile;
        }

        $classes  = $this->loadMigrationClasses($includedFiles, $namespace);
        $versions = [];
        foreach ($classes as $class) {
            $version = substr($class->getShortName(), 7);

            if ($version === '0') {
                throw NameIsReserved::new($version);
            }

            $versions[$version] = $class->getName();
        }

        ksort($versions, SORT_STRING);

        return $versions;
    }
413003
public function insertBatchTSVFiles(string $tableName, $fileNames, array $columns = [])
    {
        return $this->insertBatchFiles($tableName, $fileNames, $columns, 'TabSeparated');
    }
1184735
public function addSources(array $sources)
    {
        foreach ($sources as $s) {
            if (!file_exists($s)) {
                throw new \Exception(sprintf('Unable to compress %s because the destination doesn\'t exist.', $s));
            }
            $this->sources[] = $s;
        }
    }
486880
protected function setFiles(array $files)
    {
        foreach ($files as $associativeName => $details) {
            foreach ($details as $fileKey => $detail) {
                $this->files[$fileKey][$associativeName] = $detail;
            }
        }
    }
353888
def _glob(filenames):
    
    if isinstance(filenames, string_types):
        filenames = [filenames]
    matches = []
    for name in filenames:
        matched_names = glob(name)
        if not matched_names:
            # use the original string
            matches.append(name)
        else:
            matches.extend(matched_names)
    return matches
1125686
public function setFiles($files)
    {
        $this->_files = array();
        $token        = ' ,;';
        $file         = strtok($files, $token);

        while ($file !== false) {
            $this->_files[] = $file;
            $file           = strtok($token);
        }

    }
850044
private function loadFiles($files)
    {
        if (is_dir($files)) {
            $directory = realpath($files);
            $files     = [];
            $brains    = glob($directory.'/*.rive');

            foreach ($brains as $brain) {
                $files[] = $brain;
            }

            return $files;
        }

        return (array) $files;
    }
286811
public function load($_filename,$vars=null){
        if(!is_null($vars))
            extract($vars, EXTR_OVERWRITE);
        eval('?>'.$this->read($_filename));
    }
761174
public function expandFileProperties($filename) {
    $expanded_contents = Expander::expandArrayProperties(file($filename), $this->export());
    file_put_contents($filename, implode("", $expanded_contents));
  }