Name

hdf_set_node — Set the tree structure of a node

Description

bool hdf_set_node(hdf,  
 name,  
 node); 
resource hdf;
string name;
mixed node;
 

Sets node to be a child node of HDF resource hdf. name determines where node will be added. If a node of the same top level name exists then it overwritten, otherwise the new node is appended. Returns true on success, false on failure. node can be one of:

  • An HDF resource in which case the value is copied to the new node. In this case value need not be a node of hdf and as such is a useful way of copying HDF datasets.
  • An array in which case key => value pairs are mapped to node_name => value. This also works for multi-dimensional arrays.