Re: Quick question
| From: | Ashley Sheridan | Date: | Fri, 19 Feb 2016 07:23:57 +0000 |
| Subject: | Re: Quick question | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-325407@lists.php.net to get a copy of this message | ||
On 19 February 2016 06:54:41 GMT+00:00, Aziz Saleh <azizsaleh@gmail.com> wrote:
>On Fri, Feb 19, 2016 at 12:13 AM, Jeffry Killen <jekillen@prodigy.net>
>wrote:
>
>> Hi;
>> I am looking at the php online manual at copy;
>>
>> I am using it in code to create copies of files and directories in a
>> directory branch.
>> It is failing to copy directories in the branch.
>>
>> Is that because it is not supposed to be used to copy directories?
>>
>> The manual does not seem to specify that it can't be used to make
>> directories specifically (as if by copying).
>>
>> The situation is that a temp dir is created under a different name
>at the
>> same level as the target dir.
>> But all the directories in the tree below that can use the same name
>as
>> the originals.
>>
>> Thank you;
>>
>> I have recursive code to develop a full list of included files and
>> directories,
>> and am looping through backward to make copies of and/or remove
>selected
>> directory structures.
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>In the description, it says: "copy - Copies file":
>http://php.net/manual/en/function.copy.php
>
>Possible solution if you want to copy files + directory:
>http://stackoverflow.com/a/12763962/1935500
Coming from a Linux background, copying directories would be an understandable assumption with the
"everything's a file" philosophy.
Thanks,
Ash
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.