Welcome Guest, Not a member yet? Register   Sign In
Directory Helper - order by file size
#1

[eluser]peter222[/eluser]
With Directory Helper I get array of directories/files. Very useful but is there any way to order files by file size?
#2

[eluser]peter222[/eluser]
ok, I found it in File Helper Smile)
get_dir_file_info('path/to/directory/', $top_level_only = TRUE)

By the way, it would be good idea to put any info in Directory Helper about it Smile
#3

[eluser]peter222[/eluser]
No! sorry it's still not a solution. get_dir_file_info with TRUE show me only folders, with FALSE - only files.
I want to get dir/files structure like directory_map in Directory Helper, but with file details like get_dir_file_info in File Helper. Is it possible?
#4

[eluser]Aken[/eluser]
You'll need to put some custom work into doing so - CI can't do that easily out of the box. You could loop through the directory_map() array and use get_file_info() on each file, or you could copy the get_dir_file_info() function into your own custom one, and modify it to do what you need (this is what I would do).
#5

[eluser]peter222[/eluser]
Thank Yoy for reply. I will do that.




Theme © iAndrew 2016 - Forum software by © MyBB