cancel
Showing results for 
Search instead for 
Did you mean: 

[Resolved]: List of immediate child files of a node

unknown-user
Champ on-the-rise
Champ on-the-rise
Hi All

How to get list of immediate child files of the given node.
I am trying with the following code–

import org.alfresco.service.cmr.model.FileFolderService;
org.alfresco.repo.model.filefolder.FileFolderServiceImpl;

FileFolderService ffs = new FileFolderServiceImpl();
java.util.List list = ffs.listfiles(NodeRef folderNodeRef);

But not able to import org.alfresco.service.cmr.model and org.alfresco.repo.model.filefolder  packages.What are the jar files required for these two packages?


Regards
Nishant
1 REPLY 1

unknown-user
Champ on-the-rise
Champ on-the-rise
Hi All

I have resolved this issue.
For this, I called queryChildren method of RepositoryServiceSoapBindingStub object.just pass the node ref in this method. this method returns the QueryResult object.from this object you can get the ResultSet object. after iterating this ResultSet object, we can get the immediate child file names.

Regards
Nishant