Skip to content
Prev Previous commit
Next Next commit
Fix OCP\Util documentation blocks
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Aug 29, 2022
commit d90b31401c412d18e29ac08f6d091d09d1fc4ce0
8 changes: 8 additions & 0 deletions lib/public/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -630,14 +630,22 @@ public static function isFunctionEnabled(string $functionName): bool {
}

/**
* Compute the fileId to use for dav responses
*
* @param int $id Id of the file returned by FileInfo::getId
* @since 25.0.0
*/
public static function getDavFileId(int $id): string {
$instanceId = \OC_Util::getInstanceId();
$id = sprintf('%08d', $id);
return $id . $instanceId;
}

/**
* Compute the format needed for returning permissions for dav
*
* @since 25.0.0
*/
public static function getDavPermissions(\OCP\Files\FileInfo $info): string {
$p = '';
if ($info->isShared()) {
Expand Down