Remove ownership for a folder and all its descendants. */
(string $folder)
| 1061 | |
| 1062 | /** Remove ownership for a folder and all its descendants. */ |
| 1063 | public static function removeOwnerForTree(string $folder): void |
| 1064 | { |
| 1065 | $folder = trim($folder, "/\\ "); |
| 1066 | $owners = self::getFolderOwners(); |
| 1067 | foreach (array_keys($owners) as $k) { |
| 1068 | if ($k === $folder || strpos($k, $folder . '/') === 0) { |
| 1069 | unset($owners[$k]); |
| 1070 | } |
| 1071 | } |
| 1072 | self::saveFolderOwners($owners); |
| 1073 | } |
| 1074 | |
| 1075 | /** Rename ownership keys for an entire subtree: old/... → new/... */ |
| 1076 | public static function renameOwnersForTree(string $oldFolder, string $newFolder): void |
no test coverage detected