-
-
Notifications
You must be signed in to change notification settings - Fork 39
Add feature to rename directories #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/Node/DirectoryInterface.php
Outdated
* Rename the directory and return the new directory through a promise | ||
* | ||
* @param string $toDirectoryName | ||
* @return PromiseInterface<FileInterface> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be PromiseInterface<DirectoryInterface>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sure! Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome 👍
50766f6
to
c2acc99
Compare
examples/directory_rename.php
Outdated
use React\EventLoop\Factory; | ||
use React\Filesystem\Filesystem; | ||
|
||
require '../vendor/autoload.php'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be relative to __DIR__
so that this example works irrespective of from where it is called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
c2acc99
to
c69d604
Compare
This PR extends
DirectoryInterface
and adds method torename()
current directory object. The api is the same asFileInterface
has: