/var/www/vhosts/ihelp.ro/httpdocs/vendor/psy/psysh/src/Readline/Hoa
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/psy/psysh/src/Readline/Hoa/FileLink.php (4287B)
getStreamName());
}
/**
* Change file group.
*/
public function changeGroup($group): bool
{
return \lchgrp($this->getStreamName(), $group);
}
/**
* Change file owner.
*/
public function changeOwner($user): bool
{
return \lchown($this->getStreamName(), $user);
}
/**
* Get file permissions.
*/
public function getPermissions(): int
{
return 41453; // i.e. lrwxr-xr-x
}
/**
* Get the target of a symbolic link.
*/
public function getTarget(): FileGeneric
{
$target = \dirname($this->getStreamName()).\DIRECTORY_SEPARATOR.
$this->getTargetName();
$context = null !== $this->getStreamContext()
? $this->getStreamContext()->getCurrentId()
: null;
if (true === \is_link($target)) {
return new FileLinkReadWrite(
$target,
File::MODE_APPEND_READ_WRITE,
$context
);
} elseif (true === \is_file($target)) {
return new FileReadWrite(
$target,
File::MODE_APPEND_READ_WRITE,
$context
);
} elseif (true === \is_dir($target)) {
return new FileDirectory(
$target,
File::MODE_READ,
$context
);
}
throw new FileException('Cannot find an appropriated object that matches with '.'path %s when defining it.', 1, $target);
}
/**
* Get the target name of a symbolic link.
*/
public function getTargetName(): string
{
return \readlink($this->getStreamName());
}
/**
* Create a link.
*/
public static function create(string $name, string $target): bool
{
if (false !== \linkinfo($name)) {
return true;
}
return \symlink($target, $name);
}
}