View Single Post
Old 02-15-2008, 05:46 AM   #31
kacir
Wizard
kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.
 
kacir's Avatar
 
Posts: 3,463
Karma: 10684861
Join Date: May 2006
Device: PocketBook 360, before it was Sony Reader, cassiopeia A-20
Quote:
Originally Posted by HarryT View Post
Don't you think that generating a flat file list from a folder tree is actually rather more work than simply showing the folder tree in the first place?
No. I don't think so.
getting the contents of folders is easier than getting (let alone displaying) a tree structure.
Sony reader uses Montavista Linux with BusyBox
One of 280 unix utilities the BusyBox can be compiled to be is find.
So obtaining a list of all files in all subdirectories in, let's say, /opt/card is as simple as:
find /opt/card -type f
That is it.
Of course, you can get fancy, and have 'find' command list only files of supported types, and other stuff.
kacir is offline   Reply With Quote