Re: Quick question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux