cancel
Showing results for 
Search instead for 
Did you mean: 

Node count in its parent folder.

atultalhar
Champ in-the-making
Champ in-the-making

Hi,

May i know the correct method to get the node count in the parent folder. I have done this

```

        ChildAssociationRef parent = serviceRegistry.getNodeService().getPrimaryParent(nodeRef);
        final NodeRef fileNodeRef = parent.getChildRef();                                                                
        final FileInfo parentInfo = serviceRegistry.getFileFolderService().getFileInfo(fileNodeRef);
        if(!parentInfo.getType().toString().equals(SYSTEM_FOLDER)) {
            if (!parentInfo.isFolder()) {
                fileCount++;
            }
        }
```
Means, it shuold have node count of folder always whether we are uploading a file or not.
can you just suggest me ?
0 REPLIES 0