Generates a unique filename, based on the package, class, method name, and invocation count

@return String: the filename
504970
private String generateFilename() {
        String counter = "";
        if (capabilities.getInstance() > 0) {
            counter = "_" + capabilities.getInstance();
        }
        return test + counter;
    }
360466
public function getIndexedFilename()
    {
        $extension = strtolower($this->getMimeType());
        $extension = explode('/', $extension);
        $extension = $extension[1];

        return $this->uniqueName . $this->getImageIndex() . '.' . $extension;
    }
935194
public function name(): string
    {
        static $name = null;
        if ($name === null) {
            // Extract command name from the class name.
            $class = substr(strrchr(static::class, '\\'), 1);
            $name = CommandLoader::inverseTranslate($class);
        }

        return $name;
    }
941125
public function getFilename()
    {
        if (is_null($this->filename) === true) {
            $str = new StringWrapper(parent::getFilename());
            $this->filename = $str->deleteSufix('.'.$this->getExtension());
        }

        return $this->filename;
    }
1239110
private String generateFileName() {
        int checksum = 1;

        Set<TypeId<?>> typesKeySet = types.keySet();
        Iterator<TypeId<?>> it = typesKeySet.iterator();
        int[] checksums = new int[typesKeySet.size()];
        int i = 0;

        while (it.hasNext()) {
            TypeId<?> typeId = it.next();
            TypeDeclaration decl = getTypeDeclaration(typeId);
            Set<MethodId> methodSet = decl.methods.keySet();
            if (decl.supertype != null) {
                int sum = 31 * decl.supertype.hashCode() + decl.interfaces.hashCode();
                checksums[i++] = 31 * sum + methodSet.hashCode();
            }
        }
        Arrays.sort(checksums);

        for (int sum : checksums) {
            checksum *= 31;
            checksum += sum;
        }

        return "Generated_" + checksum +".jar";
    }
1272290
public function generate(): string
    {
        $namespace = $this->reflectionClass->getNamespaceName();
        $fileDirectory = \rtrim($this->directory, '/') . '/Proxy/' . \str_replace('\\', '/', $namespace);
        $fileName = $this->reflectionClass->getShortName() . 'Proxy.php';
        $filePath = $fileDirectory . '/' . $fileName;

        if (!\is_dir($fileDirectory)) {
            // Try create directory
            if (false === @\mkdir($fileDirectory, 0777, true)) {
                throw new \RuntimeException(sprintf(
                    'Could not create directory "%s" for proxy file. Maybe not rights?',
                    $fileDirectory
                ));
            }
        } else if (!\is_writable($fileDirectory)) {
            throw new \RuntimeException(sprintf(
                'Cannot write to "%s" directory for save proxy file.',
                $fileDirectory
            ));
        }

        // Create file
        if (false === @\touch($filePath)) {
            throw new \RuntimeException(sprintf(
                'Could not create file "%s" for proxy class. Maybe not rights?',
                $filePath
            ));
        }

        \file_put_contents($filePath, $this->codeGenerator->generate());

        return $filePath;
    }
482113
public function getFileName()
	{
		$file = explode('.', $this->file);
		$pop = array_pop($file);
		return implode('.', $file);
	}
1082793
protected function generateName()
    {
        do {
            // Generate a new random name after this class (handles namespaces)
            $classNamePieces = explode('\\', static::class);
            $class = array_pop($classNamePieces);
            $entropy = substr(sha1(uniqid()), 0, 5);
            $name = "{$class}_{$entropy}";

            // Check if it conflicts
            $exists = EditableFormField::get()->filter('Name', $name)->count() > 0;
        } while ($exists);
        return $name;
    }
426211
public function getClientFilename() : string
    {
        return ($this->clientFilename === null) ? $this->fileStream->getFilename() : $this->clientFilename;
    }
1237758
private function randomFileName()
    {
        $fileName = '';

        // Generate the datetime format file name
        if ($this->randomNameType == 1)
        {
            date_default_timezone_set($this->timezone);

            $date     = date($this->randomLength);
            echo $dir      = $this->savePath . $date;

            if ( !file_exists($dir) ) {
                mkdir($dir, $this->mode, true);
            }

            $fileName = $date . '/' . time();
        }
        elseif ($this->randomNameType == 2)    // Generate random character file name
        {
            $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz';
            $max   = strlen($chars) - 1;
            mt_srand( (double) microtime() * 1000000);

            for ($i = 0; $i < $this->randomLength; $i++)
            {
                $fileName .= $chars[mt_rand(0, $max)];
            }
        }
        else
        {
        }

        $this->fileExt = $this->getFileExt($this->files["name"]);

        $fileName = $fileName . '.' . $this->fileExt;

        return $fileName;
    }
1103291
private function generateFilename()
    {
        $filename = str_random(100) . "." . $this->extension;

        if(Storage::exists($this->folder . '/' . $filename))
        {
            $this->generateFilename();
        }

        return $filename;
    }
1186699
public function getIndexedFilename() {
		$extension 	= strtolower($this->getMimeType());
		$extension 	= explode('/', $extension);
		$extension 	= $extension[1];

    	return $this->_uniqueName . $this->getImageIndex() . '.' . $extension;
    }
434364
private function getFileName()
    {
        $name = $this->getArgumentNameOnly();

        switch ($this->option('type')) {
            case 'view':

                break;
            case 'model':
                $name = $this->getModelName();
                break;
            case 'controller':
                $name = $this->getControllerName($name);
                break;
            case 'seed':
                $name = $this->getSeedName($name);
                break;
        }

        // overide the name
        if ($this->option('name')) {
            return $this->option('name') . $this->settings['file_type'];
        }

        return $this->settings['prefix'] . $name . $this->settings['postfix'] . $this->settings['file_type'];
    }
510733
public function generateFilename()
    {
        $filename = $this->label().' '.date('Y-m-d H-i-s');
        $extension = $this->generateExtension();

        if ($extension) {
            return $filename.'.'.$extension;
        } else {
            return $filename;
        }
    }
485239
public function getFilename()
	{
		$filename = $this->getDisplayName();
		if ($this->getExtension() != '')
		{
			$filename .= '.' . $this->getExtension();
		}
		return $filename;
	}
655417
private function getLogFileName() : string
    {
        $file_name = $this->file_name;
        if ($this->filename_processor){
            $file_name = $this->filename_processor->process($file_name);
        }
        $file_name = self::escapeFileName($file_name);
        return $file_name;
    }
1291485
public function getName()
	{
		if (isset($this->basename))
		{
			return $this->basename;
		}

		if (isset($this->filename))
		{
			return $this->filename;
		}

		if (isset($this->path))
		{
			$bits = explode('/', $this->path);
			return end($bits);
		}

		return '';
	}