Recommend this page to a friend! |
All requests | > | Create file structure based on text s... | > | Request new recommendation | > | Featured requests | > | No recommendations |
by Bryan Chasteen - 9 years ago (2015-01-26)
+1 | I need a class to quickly parse a string such as: /root/sub/sub-sub/sub-sub-sub and create folders, change their permissions and store one file in each folder as this process of folder creation is working. I also need to delete or overwrite folders and files from previous runs that may have the same name. |
3. by Alessandro Quintiliani - 8 years ago (2016-02-15) Reply
Hello Brian
I still have a class that might be suitable to your request.
This class substantially makes a recursive copy from a source folder to a destination folder, recreating all those files and subdirs which do not exist (or overwriting otherwise), with each directory and file having the permission according to yuor settings.
I am going to customize and test this class before posting, to make it more flexible and easy to implement.
Hope it will suitable to you.
Best regards
Alessandro Quintiliani
4. by Manuel Lemos - 8 years ago (2016-02-16) in reply to comment 3 by Alessandro Quintiliani Comment
It seems he needs a class that copies files to a destination path but if the whole path does not exist, you need to create all the parent directories.
2. by Christian Vigh - 8 years ago (2016-02-15) Reply
Hi Bryan,
Ok, it is clear that the basic input parameter is a directory string.
It is also clear about which processes are to be performed (create subdirs, overwrite folders and files, change permissions).
However, there is one big information that is missing ; apart from the directory string, what is the input you have to process ? a list of files ? if yes,are you trying to search for some kind of syncing class ?
On top of that, what are the rules that guide folder overwriting, permission change and so on ?
Christian.
1. by Manuel Lemos - 8 years ago (2016-02-15) Reply
I have found some classes that can copy files to directories and create them if necessary, however it seems they only work if the parent destination directory already exists.
-1 | by Peter 40 - 8 years ago (2016-02-16) Comment function mkdir_recursive($pathname) {
} |
1. by Manuel Lemos Reply
- 8 years ago (2016-02-16)This is not a package recommendation.
It is better to submit a package that implements that code.
Recommend package | |
|