var docNodeId = <argument from api>
var docNode = search.findNode("workspace://SpaceStore/"+docNodeId);
.....
docNode.copy(objDestNode);
This code works if <argument from api> is node id of a file
.
This code doesn't work if <argument from api> is node id of a folder. It just creates an empty folder with the same name as that of <argument from api>
How do I copy a folder with all its content to a destination node?