Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e77eccc authored by Fahim Salam Chowdhury's avatar Fahim Salam Chowdhury 👽
Browse files

rnd: remove try-catch block

parent 87252701
Loading
Loading
Loading
Loading
Loading
+10 −25
Original line number Diff line number Diff line
@@ -59,12 +59,9 @@ class StorageWrapper extends Wrapper implements IWriteStreamStorage {
	 * @return bool
	 */
	public function isCreatable($path) {
		try {
		$this->checkFileAccess($path);
		} catch (StorageNotAvailableException $e) {
		return false;
	}
	}

	/**
	 * check if a file can be read
@@ -73,12 +70,9 @@ class StorageWrapper extends Wrapper implements IWriteStreamStorage {
	 * @return bool
	 */
	public function isReadable($path) {
		try {
		$this->checkFileAccess($path);
		} catch (StorageNotAvailableException $e) {
		return false;
	}
	}

	/**
	 * check if a file can be written to
@@ -87,12 +81,9 @@ class StorageWrapper extends Wrapper implements IWriteStreamStorage {
	 * @return bool
	 */
	public function isUpdatable($path) {
		try {
		$this->checkFileAccess($path);
		} catch (StorageNotAvailableException $e) {
		return false;
	}
	}

	/**
	 * check if a file can be deleted
@@ -101,20 +92,14 @@ class StorageWrapper extends Wrapper implements IWriteStreamStorage {
	 * @return bool
	 */
	public function isDeletable($path) {
		try {
		$this->checkFileAccess($path);
		} catch (StorageNotAvailableException $e) {
		return false;
	}
	}

	public function getPermissions($path) {
		try {
		$this->checkFileAccess($path);
		} catch (StorageNotAvailableException $e) {
		return $this->mask;
	}
	}

	/**
	 * see http://php.net/manual/en/function.file_get_contents.php