Re: Quick question
| From: | Lester Caine | Date: | Fri, 19 Feb 2016 11:09:21 +0000 |
| Subject: | Re: Quick question | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-325408@lists.php.net to get a copy of this message | ||
On 19/02/16 07:23, Ashley Sheridan wrote:
>> >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.
The easier explanation is that a directory has to exist before you can
copy files into it, and the simple copy does not 'automatically' create
a new subdirectory, so the stackpverflow solutions add that step to the
process. Some copy functions will build the empty directory tree first
and then run the copies, others simply add a new branch when the need
arises, which is what the recurse_copy routine does.
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk