Closed seregazhuk closed 6 years ago
This PR extends DirectoryInterface and adds method to rename() current directory object. The api is the same as FileInterface has:
DirectoryInterface
rename()
FileInterface
$loop = Factory::create(); $filesystem = Filesystem::create($loop); $dir = $filesystem->dir('new'); $dir->rename('new_name')->then(function(\React\Filesystem\Node\DirectoryInterface $newDir){ echo 'Renamed to ' . $newDir->getPath() . PHP_EOL; }, function(Exception $e) { echo 'Error: ' . $e->getMessage() . PHP_EOL; });
This PR extends
DirectoryInterface
and adds method torename()
current directory object. The api is the same asFileInterface
has: