@param string $filename

@return \frostealth\yii2\aws\s3\commands\GetUrlCommand
491385
public function getUrl(string $filename): GetUrlCommand
    {
        /** @var GetUrlCommand $command */
        $command = $this->builder->build(GetUrlCommand::class);
        $command->byFilename($filename);

        return $command;
    }
1315074
public function getFileUrls($filename)
    {
        if ($file = $this->findFile($filename)) {
            $parser = new Rails\Assets\Parser\Base($file);
            $parser->parse(Rails\Assets\Parser\Base::PARSE_TYPE_GET_PATHS);
            $urls = [];
            foreach ($parser->urlPaths() as $url) {
                $urls[] = $url . '?body=1';
            }
            return $urls;
        }
        return false;
    }
1305014
public function getFilePath($filename)
    {
        if (modules()) {
            $filePaths = modules()->getDirs('Views');
        } else {
            $filePaths = array_reverse($this->filePaths);
        }

        foreach ($filePaths as $filePath) {
            if (is_file($filePath . $filename . '.phtml')) {
                return $filePath . $filename . '.phtml';
                break;
            } elseif (is_file($filePath . 'errors' . DIRECTORY_SEPARATOR . $filename . '.phtml')) {
                return $filePath . 'errors' . DIRECTORY_SEPARATOR . $filename . '.phtml';
                break;
            }
        }
    }
272157
public function generate( $fileName ){
		$word	= $this->generateWord();
		$this->generateImage( $word, $fileName );
		return $word;
	}
595501
public function findTemplateFile($filename)
    {
        foreach ($this->dir as $index => $dirname)
        {
            if (is_dir($dirname) && file_exists($dirname . '/' . $filename)) {
                return $dirname . '/' . $filename;
            }
        }

        return null;
    }
481324
public function getFileResource($fileName)
    {
        $resource = fopen('php://temp', 'r+');
        fwrite($resource, $this->cab->getFileContent($fileName));
        rewind($resource);
        return $resource;
    }
383265
public function createFromFile($filename)
    {
        $img = imagecreatefromstring(file_get_contents($filename));
        list($width, $height) = getimagesize($filename);

        $ascii = null;
        $incY = $this->scale;
        $incX = $this->scale / 2;
        
        for ($y = 0; $y < $height - 1; $y += $incY) {
            for ($x = 0; $x < $width - 1; $x += $incX) {
                $toX = min($x + $this->scale / 2, $width - 1);
                $toY = min($y + $this->scale, $height - 1);
                $luminance = $this->luminanceAreaAverage($img, $x, $y, $toX, $toY);
                $ascii .= $this->luminance2character($luminance);
            }
            $ascii .= PHP_EOL;
        }

        return $ascii;
    }
429108
public function toFile($filename)
    {
        $filename = Yii::getAlias($filename);
        FileHelper::createDirectory(dirname($filename));
        return $this->toStream(fopen($filename, 'w+'));
    }
202327
public function filename($filename = null)
    {
        if ($filename === null) {
            return $this->_filename;
        }
        $this->_filename = $filename;
    }
506807
public function getPathFromFile($filename)
	{
		$i = strrpos($filename, self::getSlash());

		if ($i!== false)
		{
			return substr($filename, 0, $i);
		}
		else
		{
			return $filename;
		}
	}
636708
public static function load( $fileName )
	{
		$parser	= new XML_DOM_Parser();
		$xml	= FS_File_Reader::load( $fileName );
		$tree	= $parser->parse( $xml );
		return $tree;
	}
758996
public static function getExtension($filename)
    {
        Deprecated::method(3.0, 'Use pathinfo() instead.');

        $pos = strrpos($filename, '.');
        if ($pos === false) {
            return '';
        }
        $ext = substr($filename, $pos + 1);

        return $ext;
    }
504737
public function path($filename)
    {
        if (preg_match('~^' . $this->base_directory . '~', $filename)) {
            return $filename;
        }

        return rtrim($this->base_directory, '/') . '/' . ltrim($filename, '/');
    }
233291
protected function getImagePath($filename)
    {
        // find file
        foreach (config('imagecache.paths') as $path) {
            // don't allow '..' in filenames
            $image_path = $path.'/'.str_replace('..', '', $filename);
            if (file_exists($image_path) && is_file($image_path)) {
                // file found
                return $image_path;
            }
        }

        // file not found
        abort(404);
    }
84800
protected function getFile($filename)
    {
        $api = $this->api->api('Repositories\Src');
        /* @var Src $api */

        try {
            $file = $api->raw($this->raw['owner']['username'], $this->raw['name'], 'master', $filename);
            /** @var Response $file */
            if ($file->isSuccessful()) {
                return $file->getContent();
            }
        } catch (\Exception $e) {
            //file not found
        }
    }
938338
public function getFile( $fileName )
    {
        if ( !isset( $this->storage->_attachments[$fileName] ) )
        {
            throw new phpillowNoSuchPropertyException( $fileName );
        }

        $attachment = $this->storage->_attachments[$fileName];

        return new phpillowLazyFile(
            $this->getConnection(),
            $this->getDatabase() . urlencode( $this->_id ) . '/' . $fileName,
            $attachment['content_type'],
            $attachment['length']
        );
    }
869460
public function getCookie($filename){
		$data = S($filename);
		if($data){
			$login=json_decode($data,true);
			$send_snoopy = new Snoopy;
			$send_snoopy->rawheaders['Cookie']= $login['cookie'];
			$send_snoopy->maxredirs = 0;
			$url = "https://mp.weixin.qq.com/cgi-bin/home?t=home/index&lang=zh_CN&token=".$login['token'];
			$send_snoopy->fetch($url);
			$header = $send_snoopy->headers;
			$this->log('header:'.print_r($send_snoopy->headers,true));
			if( strstr($header[3], 'EXPIRED')){
				return $this->login();
			}else{
				$this->_token =$login['token'];
				return $login['cookie'];
			}
		}else{
			return $this->login();
		}
	}