Registers the routes config file
It will just require the file e.g. execute the instructions in the file

@param string|null $filePath
496327
public static function routes(string $filePath = null)
    {
        if (is_file($filePath)) {
            require $filePath;

            Event::dispatch('minimal.loaded.routes', [$filePath]);
        }
    }
245429
private function registerRoute(string $path, $handler, array $option = [])
    {
        $path = '/' . \trim($path, '/ ');

        $this->routes[$path] = [
            'handler' => $handler,
            'option' => $option
        ];
    }
1182394
public static function sendFile( $filePath ){
      $config =& CKFinder_Connector_Core_Factory::getInstance("Core_Config");
      if ( $config->getXSendfile() ){
        CKFinder_Connector_Utils_FileSystem::sendWithXSendfile($filePath);
      } else {
        CKFinder_Connector_Utils_FileSystem::readfileChunked($filePath);
      }
    }
193950
protected function routesRegister(string $file, string $namespace)
    {
        $this->app->router->group([
            'namespace' => $namespace,
        ], function ($router) use ($file) {
            require $file;
        });
    }
352402
protected function validateFilePath($filePath)
    {
        if (false === (\is_dir($filePath) && \is_writable($filePath))) {
            throw new SitemapException(
                \sprintf("Provided path '%s' does not exist or is not writable.", $filePath)
            );
        }
    }
56780
private function validateRegisterFilepath($registerFilepath)
    {
        if (false === file_exists($registerFilepath)) {
            throw new \InvalidArgumentException("File $registerFilepath does not exist");
        }

        $yamlPattern = '#' . '(.*)\.yml$' . '#';

        $isAYamlFile = preg_match($yamlPattern, $registerFilepath);
        if (false === $isAYamlFile) {
            throw new \InvalidArgumentException("File $registerFilepath is not a YAML file");
        }
    }
465928
public function setFilepath($filepath)
    {
        $this->_path = pathinfo($filepath);

        if (!isset($this->_path['extension']))
            $this->_path['extension'] = null;

        return $this;
    }
373836
public function attachFile(string $filePath, string $name = null)
    {
        $this->attachedFiles[] = [
          'path' => $filePath,
          'name' => $name
        ];

        return $this;
    }
1204802
private function loadImageFromFile($filepath)
    {
        $this->from = 'local';
        $this->filename = $filepath;

        if (!is_readable($filepath)) {
            return;
        }

        $image = null;
        $extension = '';
        list($width, $height, $imageType) = getimagesize($filepath);

        switch ($imageType) {
            case IMAGETYPE_GIF:
                $extension = 'gif';
                $image = imagecreatefromgif($filepath);
                break;

            case IMAGETYPE_PNG:
                $extension = 'png';
                $image = imagecreatefrompng($filepath);
                break;

            case IMAGETYPE_JPEG:
                $extension = 'jpg';
                $image = imagecreatefromjpeg($filepath);
                break;
        }

        if ($image) {
            $this->type = $imageType;
            $this->resource = $image;
            $this->extension = $extension;
            $this->width = $this->boxWidth = $width;
            $this->height = $this->boxHeight = $height;
        }
    }
802504
public function registerBindings(string $filePath = null)
    {
        is_file($filePath) || $filePath = App::getBasePath() . $filePath;

        if (is_file($filePath)) {
            /** @noinspection PhpIncludeInspection */
            $bindings = require_once $filePath;

            $bindings = is_array($bindings) ? $bindings : [];

            IOC::addBindings($bindings);

            Event::dispatch('minimal.loaded.bindings', [$filePath, $bindings]);
        }
    }
1053678
public static function loadContextFromFile(string $filePath): ContextInterface
    {
        if(!file_exists($filePath)){
            throw new Exception\FileNotFoundException('Context file not found: '.$filePath, 404, null, $filePath);
        }

        $contents = file_get_contents($filePath);
        $context_array = json_decode($contents, true);

        if($context_array === null){
            throw new Exception\MalformedJsonException('JSON sintax error.');
        }

        return new self($context_array);
    }
567923
public function loadHtmlFile($filePath)
    {
        if (!is_string($filePath)) {
            throw new InvalidArgumentException(__METHOD__ . ' expects parameter 1 to be string.');
        }

        if (!preg_match("/^https?:\/\//i", $filePath) && !file_exists($filePath)) {
            throw new RuntimeException("File $filePath not found");
        }

        try {
            $html = file_get_contents($filePath);
        } catch (\Exception $e) {
            throw new RuntimeException("Could not load file $filePath");
        }

        if ($html === false) {
            throw new RuntimeException("Could not load file $filePath");
        }

        $this->loadHtml($html);

        return $this;
    }
1198344
public void load(String filePath, ControlOverrides overrides) {
        try {
            config = new ZapXmlConfiguration(filePath);
            if (overrides != null) {
                for (Entry<String,String> entry : overrides.getOrderedConfigs().entrySet()) {
                	logger.info("Setting config " + entry.getKey() + " = " + entry.getValue() + 
                			" was " + config.getString(entry.getKey()));
                	config.setProperty(entry.getKey(), entry.getValue());
                }
            }
            parse();
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
        }
	}
15052
protected function init(string $path, array $files = [])
    {
        static::$path = $path;
        $this->addConfigFile($files);
        $this->load();
    }
462698
public synchronized void loadConfig(String filePath) throws Exception {

        if (isLoaded) {
            return;
        }

        String filePathInternal = filename;

        if (filePath != null) {

            filePathInternal = filePath;
        }

        DisconfAutowareConfig.autowareConfig(INSTANCE, filePathInternal);

        isLoaded = true;
    }
140820
protected function append($filePath, $data)
    {
        $fileHandle = fopen(app_path($filePath), "r");

        $i = 0;
        $n = 0;

        while(!feof($fileHandle))
        {
            ++$i;
            $line = fgets($fileHandle);
            if(strpos(trim($line), "}") === 0)
            {
                $n = $i;
            }
        }
        fclose($fileHandle);

        if($this->output == "api")
        {
            $view = View::file(__DIR__."/template/append_api_controller.blade.php", $data);
        }else{
            $view = View::file(__DIR__."/template/append_controller.blade.php", $data);
        }

        $fp = new \SplFileObject(app_path($filePath), 'r+');
        $fp->seek($n - 2);
        $fp->fwrite("    ".$view->render());
    }
201643
protected function buildDirectory($filePath)
	{
		$directory = dirname($filePath);
		
		if (!is_dir($directory)) {
			mkdir($directory, 0777, true);
		}
	}