According to documentation, a folder can contain documents or other folders, and the FileManager.listFolder method can return both into an Items array.
Is it possible to specify to the filemanager to only return Items of type Document into the Items array?
Message was edited by:
Marked thread as solved.
If you're still looking for an answer to this - you can achieve this using SearchManager rather than FileManager, and effectively do an "all" search (eg. Name=*). This allows you to qualify the searched item types using a list of options, so in this case you'd want SEARCH_FOR_FOLDERS = false. You can also restrict the number of returned items, whereas the FileManager.listFolder approach only appears to be able to return everything, which surely must get slow once you have tens of thousands of items in the folder.
That's a good idea! Thanks for the suggestion.
However, I am looking at the Content Services Javadoc (version 10g Release 1) for the SearchManager, and cannot find SEARCH_FOR_FOLDERS as an option. Is there another option I can use?
I must admit that I'm using the Content DB API rather than Content Services, so possbly there's some slight difference. That said, I see the relevant options in the Content Services API at:
so maybe you're looking at a different API again. There's an Options.SEARCH_FOR_DOCUMENTS option to include/exclude documents from the search, and Options.SEARCH_FOR_FOLDERS for folders.
Thanks for pointing that out. I believe we are looking at 2 different versions of the same Java class. I am looking at is 10.1.1 while you are looking at 10.1.2. Unfortunately, the version we are using in this client is 10.1.1, and upgrading is not an option at this point.
Thanks nevertheless for pointing that out. At least we have a solution to go with once we upgrade.