Deep Copies
A deep copy is a virtual copy of a node and all the nodes under it. (The actual copy occurs when an object is updated, in Copy-On-Write fashion. This allows deep copies to be done quickly while consuming very little disk space.) A deep copy can be made of any First Class Object under the root branch index, by calling the method PNode fork(String newBranchName) on the object. The returned object is the copy and has been added to the index with the name newBranchName.
After copying an object, the name of the object and the name of the copy can not be changed. Normal practice then is to assign Well Known Names to an object prior to making the copy and to the copy once it has been created. (Neither the name nor the Well Known Name of an object are copied.)
Here is a program which demonstrates the use of deep copies. And here is the output from that program.
UP: [CowDb]
PREVIOUS: [WellKnownNames]
Next: Lists