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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Data Model Questions /

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

Retriving Folder structures from Files DB


Go to End


1375 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