19declare(strict_types=1);
24use Sabre\DAV\ICollection;
29use ILIAS\WebDAV\DataCheck;
30use Sabre\DAV\Exception\Forbidden;
48 $base_path = $this->request_translation->getRequestedPathAsArray()[0] ??
'';
49 if (empty($base_path)) {
61 $proxy = $this->proxy_generator->get(
$path, $parent);
62 if ($proxy ===
null || $proxy instanceof
NullProxy) {
71 $problems = $this->proxy_generator->analyseProblems(
$container);
73 $problems[
'duplicates'],
74 $problems[
'forbidden'],
75 $problems[
'info_name_collision'],
82 if ($proxy->
getType() === Type::FILE) {
100 $proxy = $this->proxy_generator->createFile(
$container, $name);
102 throw new Forbidden(
"Cannot create file '{$name}' in container '{$container->getName()}'");
104 $proxy->getStreamHandler()->put($name,
$data, !$this->isEmpty(
$data));
107 if (!$entity instanceof
File) {
108 throw new Forbidden(
"Created file '{$name}' could not be retrieved");
111 return $entity->getEtag();
116 $proxy = $this->proxy_generator->createContainer(
$container, $name);
117 if ($proxy ===
null || $proxy instanceof
NullProxy) {
118 throw new Forbidden(
"Cannot create container '{$name}' in '{$container->getName()}'");
120 return $proxy->getName();
125 return $this->proxy_generator->get($name,
$container) !==
null;
130 if (!$this->proxy_generator->rename($entity)) {
131 throw new Forbidden(
"Cannot rename '{$entity->getName()}'");
135 public function delete(
Entity $entity):
void
137 if (!$this->proxy_generator->delete($entity)) {
138 throw new Forbidden(
"Cannot delete '{$entity->getName()}'");
145 foreach ($this->proxy_generator->in(
$container) as $proxy) {
146 if ($proxy ===
null) {
156 if ($info_file->hasProblems()) {
157 $entities[] = $info_file;
165 $parts = array_values(array_filter(explode(
'/', $full_path),
static fn(
string $p):
bool => $p !==
''));
170 $entity = $this->
get(array_shift(
$parts));
171 foreach (
$parts as $part) {
175 $entity = $this->
get($part, $entity);
createContainer(Container $container, string $name)
getChildren(Container $container)
createFile(Container $container, string $name, mixed $data=null)
getProblemInfoFile(Container $container)
has(Container $container, string $name)
__construct(private RequestTranslation $request_translation, private TreeProxyRepository $proxy_generator,)
getByFullPath(string $full_path)
buildEntity(Proxy $proxy, ?Container $container)
Virtual text file shown in every container that lists ILIAS objects which cannot be exposed via WebDA...
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts