Standard h5lite Functions as Methods
Most h5lite functions (e.g., h5_read, h5_write, h5_ls) are
available as methods on the h5 object, without the h5_ prefix.
For example, h5$write(data, "dset") is equivalent to
h5_write(data, file, "dset").
The available methods are: attr_names, cd, class, close,
create_group, delete, dim, exists, is_dataset, is_group,
length, ls, move, names, pwd, read, str, typeof, write.
Navigation ($cd(), $pwd())
The handle maintains an internal working directory to simplify
path management.
h5$cd(group): Changes the handle's internal working directory.
This is a stateful, pass-by-reference operation. It understands absolute
paths (e.g., "/new/path") and relative navigation (e.g., "../other").
The target group does not need to exist.
h5$pwd(): Returns the current working directory.
When you call a method like h5$read("dset"), the handle automatically
prepends the current working directory to any relative path. If you provide
an absolute path (e.g., h5$read("/path/to/dset")), the working directory
is ignored.
Closing the Handle ($close())
The h5lite package does not keep files persistently open. Each operation
opens, modifies, and closes the file. Therefore, the h5$close() method
does not perform any action on the HDF5 file itself.
Its purpose is to invalidate the handle, preventing any further operations
from being called. After h5$close() is called, any subsequent method
call (e.g., h5$ls()) will throw an error.