Created
August 3, 2016 09:03
-
-
Save dbu/2c1d7b2b862979b5b3ccebda4969d6e7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use League\Flysystem\Util; | |
public function read($path) | |
{ | |
$path = Util::normalizePath($path); | |
if (! ($object = $this->flysystem->getAdapter()->read($path))) { | |
return false; | |
} | |
return $object['contents']; | |
} | |
public function write($path, $contents) | |
{ | |
$path = Util::normalizePath($path); | |
return (bool) $this->flysystem->getAdapter()->write($path, $contents, $this->config); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment