@abstract   Load Speficied file onto static language collection

@param string $fullPath Full path to language file to load (.ini file).

@return bool
357903
private function loadLangFile($fullPath)
    {
        //====================================================================//
        // Check if File Exists
        if (!is_file($fullPath)) {
            return false;
        }

        //====================================================================//
        // Open File
        $file = @fopen($fullPath, "rt");
        if (!$file) {
            return false;
        }

        //====================================================================//
        // Import All New Translation Keys
        // Ex: Need 225ms for all fgets on all lang file for Third party page. Same speed than file_get_contents
        while ($line = fgets($file, 4096)) {
            $this->loadLangLine($line);
        }

        //====================================================================//
        // Close File
        fclose($file);
    }
181264
protected function createDirectoryIfNotExists(string $fullPath)
    {
        $dirName = dirname($fullPath);
        if (!@is_dir($dirName)) {
            @mkdir($dirName, 0777, true);
        }
    }
869193
public function register($id, $fullPath)
    {
        /** @var AssetService $assetService */
        $assetService = ServiceManager::getServiceManager()->get(AssetService::SERVICE_ID);

        if (self::getRegistry()->isRegistered($id)) {
            common_Logger::w('Lib already registered');
        }
        
        if (substr($fullPath, 0, strlen('../../../')) == '../../../') {
            $fullPath = ROOT_URL.substr($fullPath, strlen('../../../'));
        }
        
        $found = false;
        foreach (\common_ext_ExtensionsManager::singleton()->getInstalledExtensions() as $ext) {
            if (strpos($fullPath, $assetService->getJsBaseWww( $ext->getId() )) === 0) {
                $found = true;
                self::getRegistry()->set($id, array(
                    'extId' => $ext->getId(),
                    'path' => substr($fullPath, strlen( $assetService->getJsBaseWww($ext->getId()) ))
                ));
                break;
            }
            
        }
        if ($found == false) {
            throw new \common_exception_Error('Path "'.$fullPath.'" is not a valid asset path in Tao');
        }
    }
397163
private function loadTranslations($language)
    {
        $language = (string) $language;
        if ($language === '') {
            throw new \InvalidArgumentException('$language cannot be empty');
        }

        if (!isset($this->translations[$language])) {
            $this->translations[$language] = [];
        }

        if (isset($this->files[$language])) {
            foreach ($this->files[$language] as $file) {
                if (is_file($file)) {
                    $this->translations[$language] = array_merge(
                        $this->translations[$language],
                        $this->getTranslationArrayFromFile($file)
                    );
                } elseif (is_dir($file)) {
                    $it = new \RecursiveDirectoryIterator($file, \FilesystemIterator::SKIP_DOTS);
                    $it = new \RecursiveIteratorIterator($it, \RecursiveIteratorIterator::SELF_FIRST);

                    foreach ($it as $file) {
                        if (is_file($file->getRealPath())) {
                            $this->translations[$language] = array_merge(
                                $this->translations[$language],
                                $this->getTranslationArrayFromFile($file->getRealPath()));
                        }
                    }
                }
            }
        }
    }
443870
public static function import($path)
    {
        $path = realpath($path);
        Hook::listen(str_replace(Container::get('config')->get('app_full_path'), '', $path));
        if (!isset(self::$require[$path])) {
            if (self::isFile($path)) {
                require $path;
                self::$require[$path] = true;
            } else {
                self::$require[$path] = false;
            }
        }

        return self::$require[$path];
    }
912297
protected function setCurrentZip( $fullpath ) {

		$result = $this->zip->open( $fullpath );
		if ( true !== $result ) {
			throw new \Exception( 'Opening epub file failed' );
		}

		/* Safety dance */

		$ok = $this->getZipContent( 'META-INF/container.xml' );
		if ( ! $ok ) {
			throw new \Exception( 'Bad or corrupted META-INF/container.xml' );
		}

	}
140750
public function get_listing($fullpath = '', $page = '') {
        global $OUTPUT;

        $list = array(
            'list' => array(),
            'manage' => false,
            'dynload' => true,
            'nologin' => true,
            'path' => array()
        );

        // We analyse the path to extract what to browse.
        $fullpath = empty($fullpath) ? $this->build_node_path('root') : $fullpath;
        $trail = explode('|', $fullpath);
        $trail = array_pop($trail);
        list($mode, $path, $unused) = $this->explode_node_path($trail);

        // Is that a search?
        if ($mode === 'search') {
            return $this->search($path, $page);
        }

        // Cleaning up the requested path.
        $path = trim($path, '/');
        if (!$this->is_in_repository($path)) {
            // In case of doubt on the path, reset to default.
            $path = '';
        }
        $rootpath = $this->get_rootpath();
        $abspath = rtrim($rootpath . $path, '/') . '/';

        // Retrieve list of files and directories and sort them.
        $fileslist = array();
        $dirslist = array();
        if ($dh = opendir($abspath)) {
            while (($file = readdir($dh)) != false) {
                if ($file != '.' and $file != '..') {
                    if (is_file($abspath . $file)) {
                        $fileslist[] = $file;
                    } else {
                        $dirslist[] = $file;
                    }
                }
            }
        }
        core_collator::asort($fileslist, core_collator::SORT_NATURAL);
        core_collator::asort($dirslist, core_collator::SORT_NATURAL);

        // Fill the results.
        foreach ($dirslist as $file) {
            $list['list'][] = $this->build_node($rootpath, $path, $file, true, $fullpath);
        }
        foreach ($fileslist as $file) {
            $list['list'][] = $this->build_node($rootpath, $path, $file, false, $fullpath);
        }

        $list['path'] = $this->build_breadcrumb($fullpath);
        $list['list'] = array_filter($list['list'], array($this, 'filter'));

        return $list;
    }
1145820
public static function load($path = BASE_DIR) {
        $librariesDir = dirname(dirname($path)) . DS . 'libraries';
        foreach (glob($librariesDir . DS . "*.php") as $filename) {
            require_once $filename;
        }
    }
209641
private function LanguageCsvFile($basePath)
    {
        $ext = IO\Path::Extension($basePath);
        $baseFile = IO\Path::RemoveExtension($basePath);
        $langFile = IO\Path::AddExtension($baseFile, $this->language);
        return IO\Path::AddExtension($langFile, $ext);
    }
727565
public static function loadINI($filepath,$prefix_path=null){
    $results = parse_ini_file($filepath,true);
    if($results) {
      $results = static::filterWith(["load.ini", "load"], $results);
      static::loadArray($results,$prefix_path);
    }
  }
797887
protected function getDynamicPath($fullPath) {
        // empty string makes FM to use connector path for preview instead of absolute path
        // COMMENTED: due to it prevents to build absolute URL when "serverRoot" is "false" and "fileRoot" is provided
        // as well as "previewUrl" value in the JSON configuration file is set to the correct URL
//        if(empty($this->dynamic_fileroot)) {
//            return '';
//        }
        $path = $this->dynamic_fileroot . '/' . $this->getRelativePath($fullPath);
        return $this->cleanPath($path);
    }
510533
function loadFile(fullFilePath, callback) {
	fs.readFile(fullFilePath, "utf-8", function(err, data) {
		if (err) {
			return callback(err);
		}

		return callback(null, data);
	});
}
822128
public static function loadFromPhpFile(string $filePath): DataMap
    {
        if (! is_file($filePath)) {
            throw new CoreException(CoreException::FILE_NOT_FOUND, '找不到php文件: ' . $filePath, $filePath);
        }
        $data = include $filePath;
        return new static($data);
    }
895588
public function compileFile($file, $full = true)
    {
        if (!$file instanceof File\File) {
            $file = $this->finder()->find($file);
            if (!$file) {
                throw new Exception\RuntimeException(sprintf(
                    "Couldn't find asset file '%s'",
                    $file
                ));
            }
        }
        
        if ($full) {
            return $this->compileFileFull($file);
        } else {
            return $this->compileFileBody($file);
        }
    }
526587
public function loadIniFile($path)
    {

        $this->iniSettings = (array)parse_ini_string(
            $this->pool->fileService->getFileContents($path, false),
            true
        );

        return $this;
    }
203808
public function load($filepath)
    {
        Environment::increaseTimeLimitTo(3600);
        Environment::increaseMemoryLimitTo('512M');

        //get all instances of the to be imported data object
        if ($this->deleteExistingRecords) {
            DataObject::get($this->objectClass)->removeAll();
        }

        return $this->processAll($filepath);
    }
24322
private static function readRaw($realPath)
    {
        $content = @file_get_contents($realPath);

        if (false === $content) {
            $error = error_get_last();

            throw new \RuntimeException(sprintf(
                'Failed to read content from "%s".%s',
                $realPath,
                $error ? ' '.$error['message'] : ''
            ));
        }

        return $content;
    }