Created
September 14, 2014 20:34
-
-
Save WyriHaximus/8801c55a4e828014162d to your computer and use it in GitHub Desktop.
Directory.php
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
public function ls() { | |
$deferred = new Deferred(); | |
$this->filesystem->ls($this->path)->then(function($result) use ($deferred) { | |
$this->filesystem->getLoop()->futureTick(function() use ($result, $deferred) { | |
$this->processLsContents($result, $deferred); | |
}); | |
}, function($error) use ($deferred) { | |
$deferred->reject($error); | |
}); | |
return $deferred->promise(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment