0

I am creating folders in public:// folder by using file_prepare_directory function. I will create a folder while installing a module, So I want to keep that particular folder always bottom. Whenever I create new folder those should come on top. So How can I achieve this? In my case because of creating a folder while installing the module will become always on top I want that to be last. Thanks in advance for any suggestions. For example: I need like below

defaultFolder -created while installing.this should be always down.

Folder1 created later. these below 3 folder should be always up  of defaultFolder
Folder2 created later
Folder3 created later

But in my case defaultFolder is coming always on top and remaining folders are coming below of defaultFolder folder.

4
  • What do you mean with on top/bottom? Could you share a screenshot where the ordering should be applied?
    – Watergate
    Commented Aug 12, 2016 at 6:40
  • I wonder also what you mean by that "top/bottom", can you explain? Also, do you have any details about the names of those folders to be created (maybe you can enhance your question by including an example of the result you get, and what you would like to get? BTW: I do not like downvotes ... Commented Aug 19, 2016 at 9:59
  • @ Pierre.Vriens, Hi, I modified the above code please let me know, if any changes I need to do for more clarification.
    – Suraj
    Commented Aug 19, 2016 at 10:10
  • I think that this question is OS oriented rather than Drupal oriented, and the answer would be something like: to keep your directories sorted like you want, name them accordingly.
    – mchar
    Commented Aug 19, 2016 at 10:43

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.