Re: rename and copy recursive for directories?

From: Date: Sun, 03 Mar 2019 23:24:08 +0000
Subject: Re: rename and copy recursive for directories?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-326722@lists.php.net to get a copy of this message
Initially you said copy and now you say rename/move. Copying a directory is not the same as moving a directory. I am nearly certain that it is not necessary to recurse subdirectories when a directory is moved. Perhaps you must only do a single rename.
Jeffry Killen <mailto:jekillen@prodigy.net> Sunday, March 3, 2019 2:09 PM Thank you for your response Kalle; I have written a recursive class member method for such things as setting permissions, delete, save as (copy under a different name), and search. So I can implement it for renaming* directories * relocating a directory to different parent directory JK Kalle Sommer Nielsen <mailto:kalle@php.net> Sunday, March 3, 2019 1:21 PM Hi No, none of the file system functions does any recursive behavior like that in PHP and it is something you would have to implement on your own. The SPL extension does however implement a RecursiveDirectoryIterator which you may find useful for this. Jeffry Killen <mailto:jekillen@prodigy.net> Sunday, March 3, 2019 12:53 PM Hello; I have looked at manual entries for rename and copy but I don't see that they will work recursively for renaming or copying directories with contents. Do these work recursively for directories when a directory is copied or renamed to a new directory? Thank you JK


« previous php.general (#326722) next »