cancel
Showing results for 
Search instead for 
Did you mean: 

Any way of finding the childName of a folder?

aurora7795
Champ in-the-making
Champ in-the-making
Hi there,
I have a folder in my Company Home directory and I want to know it's childName. I have the folder's 'real name' but need it's childName so I can construct a path string to use in other methods. Anyone know how I do this? I've read that it is impossible to get the path of a Node if you only have its uuid - will I encounter a similar problem when trying to get the childName from the Node?

Thanks,
Martin BG
2 REPLIES 2

andy
Champ on-the-rise
Champ on-the-rise
Hi

If you have the node uuid and you know the store you can build the node ref and get the path to the node via the node service. Files and Folders keep the childName and the name in sync. From the node you can get the relationship to the parent in the node service which will give you allk the information about the relationship - not just the child name 🙂

Regards

Andy

cludt
Champ in-the-making
Champ in-the-making
Hi,

[…]Files and Folders keep the childName and the name in sync.[…]

this is definitively - and unfortunately - not true. The childNames of the Company Home and the Guest Home for example are different ({http://www.alfresco.org/model/application/1.0}company_home and {http://www.alfresco.org/model/application/1.0}guest_home).

As far as I have seen, all the application folders are treated differently: the spaces are replaced by underscores (who the hell knows why??).

So, Martin, if you want to build the path you have always to consider this. But I guess, your content will only be placed in subfolders of the Company Home. So, this is the only folder that has to be treated differently.

Best regards
  Christian