Search code examples
alfresco

How do I recursively display all files and subfolders?


I'm using the Alfresco Rest Api but I can't find any option that would return the whole tree with all sub-folders.

I want to go down to the last file even if it's 'wrapped' in 3 sub folders.

Any ideas ?


Solution

  • I don't think you can.

    You could execute a PATH query though, since it can be written in a way to return all children, too.

    For example:

    var folder = search.luceneSearch("+PATH:\"/app:company_home/cm:Test_x0020_Folder//*\" AND (TYPE:\"cm:content\" OR TYPE:\"cm:folder\")");