@param string $fileName

@return ArchiveEntry|false
427878
public function getFileData($fileName)
    {
        if (!isset($this->filesData[$fileName]))
            return false;

        return new ArchiveEntry($fileName, $this->filesData[$fileName]['size'],
            $this->filesData[$fileName]['size'], $this->filesData[$fileName]['mtime'],false);
    }
1346109
public function getFile($fileName)
    {
        $result = false;

        if (isset($_FILES[$fileName])) {
            $result = $_FILES[$fileName];
        }

        return $result;
    }
429108
public function toFile($filename)
    {
        $filename = Yii::getAlias($filename);
        FileHelper::createDirectory(dirname($filename));
        return $this->toStream(fopen($filename, 'w+'));
    }
727461
public static function _acquire( $filename )
    {
        if (function_exists('sem_get')) {
            @sem_acquire(self::getResource(hexdec(md5($filename))));
            return true;
        } else {
            // Generate filename
            $lockfile = $filename.'.lock';

            // Wait until lock expired or gone
            while(file_exists($lockfile)) {
                $lockExpires = intval(@file_get_contents($lockfile));
                if($lockExpires<time()) {
                    unlink($lockfile);
                } else {
                    usleep(self::LOCK_WAIT);
                }
            }

            // Create a lock
            return file_put_contents($lockfile, sprintf("%d",time()+5)) !== false;
        }
    }
605837
public function open($filename)
    {
        $this->filename = $filename;
        return $this->zipArchive->open($filename, ZIPARCHIVE::CREATE);
    }
301429
public static function instance($filename)
    {
        if (!\is_string($filename) && $filename) {
            throw new \InvalidArgumentException('Filename should be non-empty string');
        }
        if (!isset(static::$instances[$filename])) {
            static::$instances[$filename] = new static;
            static::$instances[$filename]->init($filename);
        }
        return static::$instances[$filename];
    }
366836
public function read($filename = false)
		{
			if (true === $this->_enabled && !empty($filename)) {
				$index	= $this->_zip->locateName($filename, \ZipArchive::FL_NODIR);

				if ($index) {
					return $this->_zip->getFromIndex((int)$index);
				}
			}

			return false;
		}
45652
public static function getFileNameWithoutExtension($fileName)
    {
        $matches = [];

        if (is_string($fileName) && (bool)preg_match('|(.+)\.(.+)|', $fileName, $matches)) {
            return $matches[1];
        }

        return '';
    }
961320
public function open($filename)
    {
        if (!$this->exists($filename) || false === $content = file_get_contents($filename)) {
            throw new FileNotFoundException($filename);
        }

        return $this->makeFile($filename, $content);
    }
922880
public static function fileExistsInPath(string $filename) {
		$paths = explode(';', str_replace(':', ';', get_include_path()));
		foreach($paths as $v) {
			if (file_exists($v . DIRECTORY_SEPARATOR . $filename)) {
				return $v . DIRECTORY_SEPARATOR . $filename;
			}
		}
		return false;
	}
224439
public function loadFromFile($FileName)
    {
        if (! empty($FileName)) {
            $this->FileName = $FileName;
            $result = $this->_openSHPFile();
        } else {
            /* We operate on buffer emulated by readSHP / eofSHP */
            $result = true;
        }

        if ($result && ($this->_openDBFFile())) {
            if (! $this->_loadHeaders()) {
                $this->_closeSHPFile();
                $this->_closeDBFFile();

                return false;
            }
            if (! $this->_loadRecords()) {
                $this->_closeSHPFile();
                $this->_closeDBFFile();

                return false;
            }
            $this->_closeSHPFile();
            $this->_closeDBFFile();

            return true;
        }

        return false;
    }
1352013
private function loadFile($filename)
    {
        $dom = new Document();
        $dom->formatOutput = true;
        $dom->load($filename);

        $this->applyReferenceElementtype($dom);

        return $dom;
    }
705793
public static function loadFile($fileName)
  {
    if (!preg_match('/\.ini$/i', $fileName)) {
      $fileName .= '.ini';
    }
    if (!static::isFileLoaded($fileName)) {
      self::$files[] = $fileName;
      return static::loadFileInMemory($fileName);
    }
    return false;
  }
546733
public function fromFile($filename)
    {
        $xml = $this->createDomDocument();
        $xml->load($filename);

        return new Document($xml);
    }
1219046
public function open($filename)
    {
        if (true === $this->openned) {
            $this->close();
        }
        if (!file_exists(self::TMP_DIR)) {
            mkdir(self::TMP_DIR);
        }
        $this->filename = $filename;
        $this->pclzip = new \PclZip($this->filename);
        $this->openned = true;
        return true;
    }
906463
public function getFileData($fileName)
    {
        if (!in_array($fileName, $this->files, true))
            return false;

        return $this->archive->getFileData($fileName);
    }
707565
public function isFilePathExistWithFallback($filename)
    {
        $emailPath = $this->getOutputFolder() . DIRECTORY_SEPARATOR . $filename;
        $archivePath = $this->getArchiveFolder() . DIRECTORY_SEPARATOR . $filename;
        return is_file($emailPath) ? true : (is_file($archivePath) ? true : false);
    }