Skip to content

Commit

Permalink
add convenience method to check if a file is in the hidden folder
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 committed Jan 13, 2022
1 parent e480691 commit 1a437b1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/private/Files/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -901,4 +901,8 @@ public static function getETag($path) {
public static function getHiddenFolderName(): string {
return '.hidden_' . \OC_Util::getInstanceId();
}

public static function isPathHidden($path): string {
return strpos($path, self::getHiddenFolderName()) !== false;
}
}

0 comments on commit 1a437b1

Please sign in to comment.