Thursday, April 12, 2012

Creating a folder in alfresco repository

When you want to create some folder in alfresco repository use below kind of snippet to help you creating space/folder inside repository.

private NodeRef createFolder(NodeRef parentNode, String folderName)
    {
        ServiceRegistry serviceRegistry = AlfrescoServiceRegistry.getServiceRegistry();
        FileInfo fInfo = serviceRegistry.getFileFolderService().create(parentNode, folderName, ContentModel.TYPE_FOLDER);
        return fInfo.getNodeRef();
    }

1 comment:

  1. Do you have any sample for creating a folder with tag properties in alfresco using c#.

    I am trying with DotCMIS, but there is no property to update the tag properties for the folder or the document.

    Thanks,
    Rajendran.

    ReplyDelete