Home

How to browse folder contents.

You are here

3 posts / 0 new
Last post
How to browse folder contents.

Does anyone know how to get the folder content and iterate.

I can get the stores,

RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();
ContentServiceSoapBindingStub contentService = WebServiceFactory.getContentService();
Store[] stores = repositoryService.getStores();
for (Store store : stores)
{
.....

But how do I get the content of the folder and iterate?

Thank You in advance

Re: How to browse folder contents.

May be a third party tool may do the job.
you should make a search on goolge for tool like print directory on the web.

Re: How to browse folder contents.

You can use the "queryChildren" method from RepositoryService.

Reference myFolder = new Reference(store, myUuid, null); // You can specify the path instead of the uuid if you prefer
 
RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();
QueryResult queryResult = repositoryService.queryChildren(myFolder);
ResultSet resultSet = queryResult.getResultSet();
 
ResultSetRow[] rows = resultSet.getRows();
for(ResultSetRow row : rows) {
   // Every "row" is pointing to a file
    ...
}