Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/private/Files/SimpleFS/SimpleFolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,11 @@ public function newFolder(string $path): ISimpleFolder {
$folder = $this->folder->newFolder($path);
return new SimpleFolder($folder);
}

#[\Override]
public function getOrCreateFolder(string $path, int $maxRetries = 5): ISimpleFolder {
$folder = $this->folder->getOrCreateFolder($path, $maxRetries);
return new SimpleFolder($folder);
}

}
9 changes: 9 additions & 0 deletions lib/public/Files/SimpleFS/ISimpleFolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,13 @@ public function getFolder(string $name): ISimpleFolder;
* @since 25.0.0
*/
public function newFolder(string $path): ISimpleFolder;

/**
* Get or create new folder if the folder does not already exist.
*
* @param string $path relative path of the file or folder
* @throw NotPermittedException
* @since 35.0.0
*/
public function getOrCreateFolder(string $path, int $maxRetries = 5): ISimpleFolder;
}
Loading