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
10 changes: 8 additions & 2 deletions lib/private/Files/SimpleFS/SimpleFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
namespace OC\Files\SimpleFS;

use OCP\Files\File;
use OCP\Files\GenericFileException;
use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
use OCP\Files\SimpleFS\ISimpleFile;
use OCP\Lock\LockedException;

class SimpleFile implements ISimpleFile {
private File $file;
Expand Down Expand Up @@ -48,8 +50,10 @@ public function getMTime(): int {
/**
* Get the content
*
* @throws NotPermittedException
* @throws GenericFileException
* @throws LockedException
* @throws NotFoundException
* @throws NotPermittedException
*/
public function getContent(): string {
$result = $this->file->getContent();
Expand All @@ -65,8 +69,10 @@ public function getContent(): string {
* Overwrite the file
*
* @param string|resource $data
* @throws NotPermittedException
* @throws GenericFileException
* @throws LockedException
* @throws NotFoundException
* @throws NotPermittedException
*/
public function putContent($data): void {
try {
Expand Down
10 changes: 8 additions & 2 deletions lib/public/Files/SimpleFS/ISimpleFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
*/
namespace OCP\Files\SimpleFS;

use OCP\Files\GenericFileException;
use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
use OCP\Lock\LockedException;

/**
* This interface allows to manage simple files.
Expand Down Expand Up @@ -49,8 +51,10 @@ public function getMTime(): int;
/**
* Get the content
*
* @throws NotPermittedException
* @throws GenericFileException
* @throws LockedException
* @throws NotFoundException
* @throws NotPermittedException
* @since 11.0.0
*/
public function getContent(): string;
Expand All @@ -59,8 +63,10 @@ public function getContent(): string;
* Overwrite the file
*
* @param string|resource $data
* @throws NotPermittedException
* @throws GenericFileException
* @throws LockedException
* @throws NotFoundException
* @throws NotPermittedException
* @since 11.0.0
*/
public function putContent($data): void;
Expand Down
Loading