Create a hard link, as an alias, to the cached file.

@param string $alias where to store the link,
filename without extension.

@return $this
969283
public function linkToCacheFile($alias)
    {
        if ($alias === null) {
            $this->log("Ignore creating alias.");
            return $this;
        }

        if (is_readable($alias)) {
            unlink($alias);
        }

        $res = link($this->cacheFileName, $alias);

        if ($res) {
            $this->log("Created an alias as: $alias");
        } else {
            $this->log("Failed to create the alias: $alias");
        }

        return $this;
    }
1098343
public function load($alias)
    {
        if (isset($this->aliases[$alias])) {
            return class_alias($this->aliases[$alias], $alias);
        }
        return null;
    }
135821
public function add(string $alias, CompressionMethod $compressionMethod): self
    {
        if (\array_key_exists($alias, $this->compressionMethods)) {
            throw new \InvalidArgumentException(\sprintf('The alias "%s" already exists.', $alias));
        }
        $this->compressionMethods[$alias] = $compressionMethod;

        return $this;
    }
112562
public function alias(string $alias, string $original)
    {
        $this->aliases[$alias] = $this->getRealId($original);

        return $this;
    }
520593
public function alias($abstract, $alias)
    {
        $this->aliases[$alias] = $abstract;
//        $this->abstractAliases[$abstract][] = $alias;

        $this->share($alias, function () use ($abstract) {
            return $this->get($abstract);
        });
    }
924161
public final function alias($alias) {
        $this->alias         = $alias;
        $this->qualifiedName = $this->table . ' AS ' . $this->alias;

        return $this;
    }
631602
public static function Factory($Alias = FALSE) {
      if (is_null(self::$_Factory)) {
         self::SetFactory(new Gdn_Factory());
         self::FactoryOverwrite(FALSE);
      }

      if ($Alias === FALSE)
         return self::$_Factory;
      
      // Get the arguments to pass to the factory.
      //$Args = array($Arg1, $Arg2, $Arg3, $Arg4, $Arg5);
      $Args = func_get_args();
      array_shift($Args);
      return self::$_Factory->Factory($Alias, $Args);
   }
353312
public function setAlias($alias)
    {
        $aliasManipulator = new AliasManipulator($this->originalDir, $this->alias);
        $aliasManipulator->setAlias($alias);

        return $aliasManipulator;
    }
203634
public function removeTable($alias)
    {
        if (!empty($this->tables[$alias])) {
            unset($this->tables[$alias]);
        }

        return $this;
    }
157231
public function registerAlias($alias, $file, $extension = null)
    {
        if ($extension === null) {
            $extension = File::extension($file);
        }

        $extension = strtolower($extension);

        if (!isset($this->aliases[$extension])) {
            $this->aliases[$extension] = [];
        }

        $this->aliases[$extension][$alias] = $file;

        return $this;
    }
1278342
public function getUnique($alias)
    {
        if (!$this->exists($alias)) {
            return $alias;
        }

        $info = pathinfo($alias);
        $ext = isset($info['extension']) ? '.' . $info['extension'] : '';

        $counter = 0;

        do {
            $counter++;
            $modified = $info['filename'] . '-' . $counter . $ext;
        } while ($this->exists($modified));

        return $modified;
    }
39542
public function alias($alias)
    {
        $this->alias = $alias;

        if (!in_array('`' . $alias . '`.*', $this->select)) {
            $this->select[] = '`' . $alias . '`.*';
        }

        if (in_array('`' . $this->table . '`.*', $this->select)) {
            unset($this->select[array_search('`' . $this->table . '`.*', $this->select)]);
        }

        return $this;
    }
1004306
public function addAlias($name, $alias, $shared = null)
    {
        return $this->add($name, $alias, self::ENTRY_TYPE_ALIAS, $shared);
    }
367309
public function addFolder(string $directory, string $alias = '')
	{
		$loader = $this->getRenderer()->getLoader();

		// This can only be reliably tested with a loader using the filesystem loader's API
		if (method_exists($loader, 'addPath'))
		{
			if ($alias === '')
			{
				$alias = FilesystemLoader::MAIN_NAMESPACE;
			}

			$loader->addPath($directory, $alias);
		}

		return $this;
	}
1238701
public static function makeAliasSetInstance(string $address, string $alias): self
    {
        $transaction = new self();

        $transaction->setVersion(Version::ALIAS_SET);
        $transaction->setDestinationAddress($address);
        $transaction->setValue(self::VALUE_ALIAS_SET);
        $transaction->setFee(self::FEE_ALIAS_SET);
        $transaction->setMessage($alias);

        return $transaction;
    }
534332
protected function resolveAlias($alias)
	{
		if (!empty($this->aliases[$alias]))
		{
			return $this->aliases[$alias];
		}

		return $alias;
	}
40052
public function withAlias($aliasAction, $alias)
    {
        $this->aliasAction = $aliasAction;
        $this->alias = $alias;
        return $this;
    }