Generate the filename to be used for this text.

@return string
5168
public function generateFilename(): string
    {
        $options = $this->provider->getOptions();

        $options["text"] = $this->text;

        $data = serialize($options);

        return md5($data) . "." . $this->provider->getFormat();
    }
664897
public function getFileName($path, $filename)
	{
		if (file_exists("$path/$filename")) {
			$filename = Nette\Utils\Random::generate() . '_' . $filename;
			$filename = $this->getFileName($path, $filename);
		} else {
			$filename;
		}

		return $filename;
	}
485239
public function getFilename()
	{
		$filename = $this->getDisplayName();
		if ($this->getExtension() != '')
		{
			$filename .= '.' . $this->getExtension();
		}
		return $filename;
	}
464476
private String generateName()
   {

      Calendar date = Calendar.getInstance();

      String sDate = getStrDate(date);
      String sTime = getStrTime(date);

      StringBuilder fileName = new StringBuilder(backupSetName).append("-").append(sDate).append("_").append(sTime).append("."); 

      if (isFullBackup)
      {
         fileName.append("0");
      }
      else
      {
         fileName.append(getNextSufix());
      }

      return fileName.toString();
   }
466900
private function generateNewFilename()
    {
        $time = time();
        $filename = $this->filename;
        $ext =  end(explode(".", $filename));
        do {
            $filename = substr(md5($filename. $time), 0, 8) . '.' . $ext;
        } while (file_exists($this->uploadDirectory . DIRECTORY_SEPARATOR . $filename));
        return $filename;
    }
189589
protected function getTemplateName()
    {
        $templateName = '';
        $templateFile = '';

        if (isset($this->ffData['templateFile'])) {
            $templateFile = $this->ffData['templateFile'];
        } elseif (isset($this->conf['defaultTemplateFileName'])) {
            $templateFile = $this->conf['defaultTemplateFileName'];
        }

        if ($templateFile === $this->conf['defaultTemplateFileName'] ||
            $templateFile === 'default') {
            $templateName = 'default';
        }

        // cutting off the file extension
        if ($templateName !== 'default') {
            $templateName = substr($templateFile, 0, strrpos($templateFile, '.'));
        }

        return $templateName;
    }
555538
protected function filename(): string
    {
        $model = $this->model ?? trim(str_replace('DataTable', '', mb_strrchr(static::class, '\\')), " \t\n\r\0\x0B\\");

        $resource = str_plural(mb_strtolower(array_last(explode(class_exists($model) ? '\\' : '.', $model))));

        return $resource.'-export-'.date('Y-m-d').'-'.time();
    }
1310503
public function getFileName()
    {
        $filename = substr( strrchr( $this->elfinderFilePath, '/' ), 1 );
        $parts = explode('.',$filename);
        $last = array_pop($parts);
        $filename = str_slug(implode('_',$parts)) . '_' . time();
        return $filename  . '.' . $last;
    }
361018
public function generateName ()
	{
	    $chars = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','0','1','2','3','4','5','6','7','8','9'];
	    $cod = self::DEFAULT_AGENT;
	    for ($i=0; $i < 5; $i++) { 
	        $cod .= $chars[mt_rand(0, count($chars) - 1)];
	    }
	    $cod .= '_';
	    $cod .= time();
	    return $cod;
	}
1241412
protected function thumbnailName()
    {
    	$file = explode('.', $this->image);

		$fileName = Arr::first($file);
		$fileExt = Arr::last($file);

		return $fileName
    		. ($this->width() ? '_w' . $this->width() : '')
    		. ($this->height() ? '_h' . $this->height() : '')
    		. '.' . $fileExt;
    }
120000
protected function _createFile()
        {
            do {
                $this->_filename = $this->getPath() .  mt_rand() . '.html';
            } while(File::exists($this->_filename));

            /**
             * create an empty file
             */
            File::put($this->_filename, $this->getHtml());
            chmod($this->_filename, 0777);

            return $this->_filename;
        }
770794
def generate_filename(self, directory=os.getcwd(), prefix='tile',
                          format='png', path=True):
        """"""
        filename = prefix + '_{col:02d}_{row:02d}.{ext}'.format(
                      col=self.column, row=self.row, ext=format.lower().replace('jpeg', 'jpg'))
        if not path:
            return filename
        return os.path.join(directory, filename)
721021
public function getName()
    {
        if (is_null($this->name)) {
            $this->name = is_null($this->getFile()) ? '' : $this->getFile()->getBasename();
        }
        return $this->name;
    }
202365
private function _encoded_filename()
    {
        $ext = strtolower(pathinfo($this->source_file, PATHINFO_EXTENSION));
        $encode = md5($this->source_file . http_build_query($this->url_params));
        
        // Build the parts of the filename
        $encoded_name = $encode . '-' . $this->source_modified . '.' . $ext;
        
        return $encoded_name;
    }
482735
public function getFileDisplayName()
    {
        $base = str_replace(DIRECTORY_SEPARATOR, '/', DIR_BASE);
        if (strpos($this->filename, $base) === 0) {
            $path = substr($this->filename, strlen($base) + 1);
        } else {
            $path = $this->filename;
        }

        return str_replace('/', DIRECTORY_SEPARATOR, $path);
    }
1286361
public function getText() : string {
        $start = $this->getStart();
        $end = $this->getEndPosition();

        $fileContents = $this->getFileContents();
        return \substr($fileContents, $start, $end - $start);
    }
181405
protected function generateFilePath()
    {
        $hash = $this->getHash();
        
        $dir = '';
        
        $depth = $this->getDepth();
        for($i = 0; $i < $depth; ++$i)
        {
            $dir .= $hash[$i].'/';
        }
        
        if ('' != $this->getExtension())
        {
            $hash .= '.'.$this->getExtension();
        }
        
        $parts = array(
        	$this->getClassName(),
            $this->getFieldName(),
            rtrim($dir, '/'),
            $hash,
        );
        
        return implode('/', $parts);
    }