Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Data Model Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Retriving Folder structures from Files DB


Go to End


1095 Views

Avatar
CodeGuerrilla

Community Member, 105 Posts

8 January 2010 at 1:07pm

Edited: 12/01/2010 11:52am

Does anyone know of any SS methods of retrieving Files/Folders recursively from the `Files` DB table I need to build lists of files/folders from a particular directory inside assets/uploads been looking at File/Folder/Filelist API docs but really don't see any methods for doing this, I know I can write my own function and use recursion but really do not want to do this if there is a better way?

*Edit no matter wrote my own functions to retrieve the files/folders by ParentID still there should be methods in the File or FileSystem ti do this IMO