From cd0f3855edc0779e20f83639c4f28385de5eed7a Mon Sep 17 00:00:00 2001 From: Josh Date: Tue, 3 Mar 2026 11:39:03 -0500 Subject: [PATCH] docs(Sabre/Node): fix inaccurate touch docblock Signed-off-by: Josh --- apps/dav/lib/Connector/Sabre/Node.php | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/apps/dav/lib/Connector/Sabre/Node.php b/apps/dav/lib/Connector/Sabre/Node.php index 1feac9839df79..330ff371cb286 100644 --- a/apps/dav/lib/Connector/Sabre/Node.php +++ b/apps/dav/lib/Connector/Sabre/Node.php @@ -35,15 +35,10 @@ use Sabre\DAV\INode; abstract class Node implements INode { - /** - * The path to the current node - */ - protected string $path; - - protected FileInfo $info; + // The path to the current node + protected string $path; protected IManager $shareManager; - protected \OCP\Files\Node $node; /** @@ -52,7 +47,7 @@ abstract class Node implements INode { */ public function __construct( protected View $fileView, - FileInfo $info, + protected FileInfo $info, ?IManager $shareManager = null, ) { $relativePath = $this->fileView->getRelativePath($info->getPath()); @@ -61,7 +56,6 @@ public function __construct( } $this->path = $relativePath; - $this->info = $info; $this->shareManager = $shareManager instanceof IManager ? $shareManager : Server::get(IManager::class); if ($info instanceof Folder || $info instanceof File) { @@ -157,9 +151,10 @@ public function getLastModified(): int { } /** - * sets the last modification time of the file (mtime) to the value given - * in the second parameter or to now if the second param is empty. - * Even if the modification time is set to a custom value the access time is set to now. + * Sets the file's modification time (mtime) to the given Unix timestamp. + * + * @param string $mtime Valid Unix timestamp (seconds since epoch, must be > 1 day). + * @throws \InvalidArgumentException If $mtime is not a valid timestamp. */ public function touch(string $mtime): void { $mtime = $this->sanitizeMtime($mtime);