cancel
Showing results for 
Search instead for 
Did you mean: 

FileFolderService

nm_santos
Champ in-the-making
Champ in-the-making
Hi,

I'm trying to use FileFolderService to create a folder in my user_home, in a web script.

However, I don't get any errors, but the folder isn't created either.

What is wrong?


NodeRef node = new NodeRef("workspace://SpacesStore/app:company_home/app:user_homes/cm:nunoHome");

      if ( node == null )
         throw new WebScriptException("doesn't exist");

      fileFolderService.create(node, "test folder", ContentModel.TYPE_FOLDER, ContentModel.ASSOC_CONTAINS);   

Regards,
Nuno.
1 REPLY 1

mrogers
Star Contributor
Star Contributor
That NodeRef does not look correct.   Looks more like a path.   You would normally look up a node ref from its path.