Skip to content
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

How ot move Directory to directory recurcive #117

Closed
ghost opened this issue Mar 28, 2014 · 3 comments
Closed

How ot move Directory to directory recurcive #117

ghost opened this issue Mar 28, 2014 · 3 comments

Comments

@ghost
Copy link

ghost commented Mar 28, 2014

Hello,
how copie a full directory to another please ?

i have this

dir/underDir1

and i want this to the final 👍

anotherDir/dir/underdir1

and of course move all files on the final directory ?
a function like this 👍
moveDirectory($sourceDirectory,estinationDirectory);

what do u think please?

@frankdejonge
Copy link
Member

@ychoucha moving in filesystems is renaming, so for local you can just rename the directory.

@ghost
Copy link
Author

ghost commented Apr 2, 2014

How that ?

I need to try

@Spholt
Copy link

Spholt commented Aug 16, 2016

For anyone coming to this late, the answer is to use:

Filesystem:rename('path/to/old', 'path/to/new'):

The documents are not clear that this function can actually be used for directories as well as files. Any files within your directory will also be pulled across to the new location.

Hope this helps :)

igorsantos07 added a commit to igorsantos07/flysystem that referenced this issue Nov 21, 2019
Given thephpleague#117, at least since 2014 the docs were missing clearer information on whether it's possible to delete/rename/move directories as well as files.
frankdejonge pushed a commit that referenced this issue Dec 8, 2019
Given #117, at least since 2014 the docs were missing clearer information on whether it's possible to delete/rename/move directories as well as files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants