diff options
author | Robin Appelman <robin@icewind.nl> | 2024-04-08 14:55:49 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2024-04-08 14:55:49 +0200 |
commit | 77cd7560a5392a28f6a496fc1a2a360eda256af1 (patch) | |
tree | 98431cd7e3e91d053ca5ccd6f96db91d56c1a489 /lib/private/Files/Storage/Storage.php | |
parent | e10853450e4f327d146c2874f175d2a9102a959a (diff) | |
download | nextcloud-server-path-available.tar.gz nextcloud-server-path-available.zip |
add a seperate storage method to distinguish between 'path exists' and 'path is available'path-available
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Files/Storage/Storage.php')
-rw-r--r-- | lib/private/Files/Storage/Storage.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/private/Files/Storage/Storage.php b/lib/private/Files/Storage/Storage.php index 0a2511de164..040de66afe2 100644 --- a/lib/private/Files/Storage/Storage.php +++ b/lib/private/Files/Storage/Storage.php @@ -136,4 +136,16 @@ interface Storage extends \OCP\Files\Storage { * - permissions */ public function getDirectoryContent($directory): \Traversable; + + /** + * Check if a filepath is available/unused + * + * This is usually the inverse of `file_exists` but some filesystems might have additional restrictions for + * which file names are available. + * For example with case-insensitive filesystems where names that only differ by case would conflict. + * + * @param string $path + * @return bool + */ + public function pathAvailable(string $path): bool; } |