@param string $file

@return string|false
501152
public function fileGet($file)
    {
        if (($r = @file_get_contents($this->alias->resolve($file))) === false) {
            throw new FileNotFoundException($file);
        }

        return $r;
    }
826203
public function getUrl($file = '')
        {

            $version = $this->manager->getVersion();
            $pattern = $this->manager->getPattern();

            /** Search Params
             *  %f => $file
             *  %v => $version
             */

            $f = str_replace('%f', $file, $pattern);
            $v = str_replace('%v', $version, $f);

            return $this->getUrlString() . $v;
        }
1242234
public function getFileIcon($file = '')
    {
        $extension = File::extension($file);

        foreach ($this->fileTypes as $type => $regex) {
            if (preg_match("/^($regex)$/i", $extension) !== 0) {
                return "fa-file-{$type}-o";
            }
        }

        return 'fa-file-o';
    }
510628
public function checkFilename($file)
    {
        $newFilename  = $file;
        $parts        = pathinfo($file);
        $origFilename = $parts['filename'];
        $ext          = (isset($parts['extension']) && ($parts['extension'] != '')) ? '.' . $parts['extension'] : null;

        $i = 1;

        while (file_exists($this->uploadDir . DIRECTORY_SEPARATOR . $newFilename)) {
            $newFilename = $origFilename . '_' . $i . $ext;
            $i++;
        }

        return $newFilename;
    }
933462
public static function pathInfo($file)
    {
        $result = self::_pathInfo($file);
        return self::i()->dump($result, '! pathInfo (' . $file . ') !');
    }
1114309
public static function getFileMimeType($file)
    {
        $finfo = finfo_open(FILEINFO_MIME_TYPE);
        if ($finfo) {
            $mime_type = finfo_file($finfo, $file);
            finfo_close($finfo);
            return $mime_type;
        }
        return false;
    }
701678
public function getBindingForFile( $file ) {
		$engine_key = $this->default;

		foreach ( $this->bindings as $suffix => $engine ) {
			if ( substr( $file, -strlen( $suffix ) ) === $suffix ) {
				$engine_key = $engine;
				break;
			}
		}

		return $engine_key;
	}
1273228
protected function readFile(string $file) : string
    {
        if (is_file($file) === false) {
            throw new BadFileException("The file \"{$file}\" is not a file.", $file);
        }

        if (is_readable($file) === false) {
            throw new BadFileException("Unable to open \"{$file}\" as the file is not readable.", $file);
        }

        return file_get_contents($file);
    }
546179
private function getFileContents($file) {
    if (file_exists($file) === FALSE) {
      return NULL;
    }

    $contents = file_get_contents($file);
    if ($contents === FALSE) {
      return NULL;
    }

    return $contents;
  }
561955
public function getFileClass($file)
    {
        $sections = explode(DIRECTORY_SEPARATOR, $file);
        $fileName = $sections[count($sections) - 1];

        $class = str_replace('.php', '', $fileName);

        return $class;
    }
968466
protected function parse_file($file = null) {
        if (is_null($file)) {
            $file = $this->file;
        }

        if (empty($this->file_data)) {
            $this->load_data($file);
        }

        return !empty($this->file_data) ? $this->parse_string() : false;
    }
18898
public function exists($file)
    {
        $lines = ftp_rawlist($this->connection(), '-1t ' . dirname($file));
        if (false === $lines) {
            return false;
        }

        $pattern = '{(?<!->) ' . preg_quote(basename($file)) . '( -> |$)}m';
        foreach ($lines as $line) {
            if (preg_match($pattern, $line)) {
                return true;
            }
        }

        return false;
    }
870652
public function findByFile($file)
    {
        if ($file instanceof File) {
            $file = $file->getFileID();
        }

        return $this->findBy([
            'file_id' => $file
        ]);
    }
230000
public function find(&$file)
    {
        list($package, $file) = StringHelper::explode($this->separator, $file, 2, 'array_unshift');

        if (!$package) {
            return false;
        }

        $package = $this->packageResolver->getPackage($package);

        if (!$package) {
            return false;
        }

        return $package->getDir() . '/Templates';
    }
1314733
public function realpath($file)
    {
        $prefix = preg_quote($this->_prefix, '~');
        $file = preg_replace("~^{$prefix}~", '', $file);
        if (!$this->_hasVolume) {
            return $file;
        }
        if (preg_match('~^[A-Z]+:~', $file)) {
            return $file;
        }
        $file = ltrim($file, DS);
        $pos = strpos($file, DS);
        if ($pos !== false) {
            $file = substr_replace($file, ':' . DS, $pos, 1);
        }
        return $file;
    }
75152
private static function getIgnoredFiles($file) {
    if (file_exists($file) === FALSE) {
      return array();
    }

    $contents = file_get_contents($file);
    if ($contents === FALSE) {
      return array();
    }

    return preg_split('/\s+/', $contents);
  }
1271821
public static function get($file)
    {
        $type = str_replace('image/', NULL, Singleton::class('ZN\Helpers\Mime')->type($file));

        return $type === 'jpg' ? 'jpeg' : $type;
    }