I have been trying to write a function that will print a properly ordered file structure to recreate the look and feel of a file manager. The problem is this, dir() does not automatically sort this. Then final out put needs to be fully expanded so something like this:
DirHello
DirHola
FileCiao
FileBye
FileAdios
DirHai
DirBjour
FileTov
FileHLuego
FileDasvy
FileSayo
DirBuenas
FileTschuss
FileAdieu
FileEnd
colapsed that would be:
DirHello
DirHola
DirHai
DirBuenas
FileTschuss
FileAdieu
FileEnd
Which is the proper layout. In each level, directories must be listed before files. But if the directory is non empty it's contents must be displayed before the next file or directory. This is to combine with a treemenu so the collapsing part is easy, it is just the listing and sorting part which I have almost given up on.
At first I thought a simple multi dimensional array sorting function would be a perfect fix. I couldn't find a way to put the codes in an array to make it work.
I really appreciate any help french and german is fine as well.
Thanks for your time and reading this,
TC