Make and return a file name (with path)

@param  string $id Cache id
@return string File name (with path)
430739
protected function _file($id)
    {
        $path = $this->_path($id);
        $fileName = $this->_idToFileName($id);
        return $path . $fileName;
    }
1233732
public function getByID($id)
    {
        if(array_key_exists($id, $this->idToSlugCache))
            $slug = $this->idToSlugCache[$id];
        else
            $slug = $this->SystemCache->get($this->getModel()->getTableName().':id:'.$id);

        if (!empty($slug)) {
            return $this->getBySlug($slug);
        }

        $this->loadSource();

        if(!isset($this->slugsByID[$id]))
            return null;

        $slug = $this->slugsByID[$id];

        return $this->getBySlug($slug);
    }
559691
protected function createId($id)
    {
        if (is_null($id)) {
            return md5(join('_', [
                $this->config['shortcode'],
                $this->mobile,
                time(),
            ]));
        }

        return $id;
    }
1224539
protected function getCacheHash($id)
    {
        if (is_array($id)) {
            $id = Util::filterScalarValues($id);
            $id = array_map(
                function ($child) {
                    return (string)$child; //Converts ids from integer to string => Parameters for transform and reverse functions must be identicals
                },
                $id
            );
            sort($id);
        } else {
            $id = (string) $id;
        }

        return md5(
            json_encode(
                array(
                    spl_object_hash($this->queryBuilder),
                    $this->identifier,
                    $id,
                )
            )
        );
    }
869425
public function get_metadata($id)
	{
		if ( ! file_exists($this->_cache_path.$id))
		{
			return FALSE;
		}

		$data = unserialize(file_get_contents($this->_cache_path.$id));

		if (is_array($data))
		{
			$mtime = filemtime($this->_cache_path.$id);

			if ( ! isset($data['ttl']))
			{
				return FALSE;
			}

			return array(
				'expire' => $mtime + $data['ttl'],
				'mtime'	 => $mtime
			);
		}

		return FALSE;
	}
56157
protected function _metadatasFile($id)
    {
        $path = $this->_path($id);
        $fileName = $this->_idToFileName('internal-metadatas---' . $id);
        return $path . $fileName;
    }
1056918
protected function _get($id)
	{
		if ( ! is_file($this->_cache_path.$id))
		{
			return FALSE;
		}

		$data = unserialize(file_get_contents($this->_cache_path.$id));

		if ($data['ttl'] > 0 && time() > $data['time'] + $data['ttl'])
		{
			unlink($this->_cache_path.$id);
			return FALSE;
		}

		return $data;
	}
690298
public function get($id)
    {
        $document = $this->getFileCollection()->findOne(['_id' => $id]);
        return empty($document) ? null : $this->createDownload($document);
    }
484599
protected function generatePathname($id)
    {
        if (!file_exists($this->basePath)) {
            mkdir($this->basePath, 0777, true);
        }

        return $this->basePath.'/'.$id;
    }
1040799
public function exportById($id): string
    {
        $siteGroup = Craft::$app->sites->getGroupById((int) $id);

        return $this->export($siteGroup);
    }
178021
protected function getFilepath($id, $pathPrefix = null)
	{
		if ($pathPrefix === null)
		{
			$pathPrefix = $this->uploadPath;
		}
		else
		{
			$pathPrefix = rtrim($pathPrefix, $this->pathTrimMask);
		}

		return $pathPrefix . '/' . $id;
	}
1074874
private function generateMethodName($id)
    {
        if (isset($this->serviceIdToMethodNameMap[$id])) {
            return $this->serviceIdToMethodNameMap[$id];
        }

        $name = Container::camelize($id);
        $name = preg_replace('/[^a-zA-Z0-9_\x7f-\xff]/', '', $name);
        $methodName = 'get'.$name.'Service';
        $suffix = 1;

        while (isset($this->usedMethodNames[strtolower($methodName)])) {
            ++$suffix;
            $methodName = 'get'.$name.$suffix.'Service';
        }

        $this->serviceIdToMethodNameMap[$id] = $methodName;
        $this->usedMethodNames[strtolower($methodName)] = true;

        return $methodName;
    }
471455
protected function prepareId($id) {
		if (! is_scalar($id)) {
			$id = json_encode($id);
			
			if (isset($id[33])) {
				$id = md5($id);
			}
		}
		
		if ($this->namespace === null) {
			return $id;
		}
		
		return $this->namespace . '_' . $id;
	}
525079
public function getPluginPath($id)
    {
        $classId = $this->getIdentifier($id);
        if (!isset($this->pathMap[$classId])) {
            return null;
        }

        return File::normalizePath($this->pathMap[$classId]);
    }
163666
public function getCacheId($id)
    {
        if(is_array($id))
        {
            $tmp = "";
            foreach ($id as $key => $value)
            {
                $tmp .= $key . "_" . $value;
            }
            $id = $tmp;
        }
        return $this->addCacheIndex($this->table_name . '_' . $id);
    }
48816
protected function getBucketNameFromId($id)
    {
        $buckets = $this->listBuckets();

        foreach ($buckets as $bucket) {
            if ($bucket->getId() === $id) {
                return $bucket->getName();
            }
        }

        return null;
    }
1018356
private function getDocumentPath(string $id): string
    {
        return $this->getDirectoryPath($id).'.'.$this->format->getExtension();
    }