Attributes
Dictionary interface
HDF5.attrs — Functionattrs(object::Union{File,Group,Dataset,Datatype})The attributes dictionary of object. Returns an AttributeDict, a Dict-like object for accessing the attributes of object.
attrs(object)["name"] = value # create/overwrite an attribute
attr = attrs(object)["name"] # read an attribute
delete!(attrs(object), "name") # delete an attribute
keys(attrs(object)) # list the attribute namesHDF5.attributes — Functionattributes(object::Union{File,Object})The attributes of a file or object: this returns an Attributes object, which is Dict-like object for accessing the attributes of object: getindex will return an Attribute object, and setindex! will call write_attribute.
Mid-level Interface
HDF5.Attribute — TypeHDF5.AttributeA HDF5 attribute: this is a piece of metadata attached to an HDF5 Group or Dataset. It acts like a Dataset, in that it has a defined datatype and dataspace, and can read and write data to it.
See also
HDF5.open_attribute — Functionopen_attribute(parent::Union{File,Group,Dataset,Datatype}, name::AbstractString)Open the Attribute named name on the object parent.
HDF5.create_attribute — Functioncreate_attribute(parent::Union{File,Object}, name::AbstractString, dtype::Datatype, space::Dataspace)
create_attribute(parent::Union{File,Object}, name::AbstractString, data)Create a new Attribute object named name on the object parent, either by specifying the Datatype and Dataspace of the attribute, or by providing the data. Note that no data will be written: use write_attribute to write the data.
HDF5.read_attribute — Functionread_attribute(parent::Union{File,Group,Dataset,Datatype}, name::AbstractString)Read the value of the named attribute on the parent object.
Example
julia> HDF5.read_attribute(g, "time")
2.45HDF5.write_attribute — Functionwrite_attribute(parent::Union{File,Object}, name::AbstractString, data)Write data as an Attribute named name on the object parent.
HDF5.delete_attribute — Functiondelete_attribute(parent::Union{File,Object}, name::AbstractString)Delete the Attribute named name on the object parent.
HDF5.rename_attribute — Functionrename_attribute(parent::Union{File,Object}, oldname::AbstractString, newname::AbstractString)Rename the Attribute of the object parent named oldname to newname.
Convenience interface
HDF5.h5readattr — Functionh5readattr(filename, name::AbstractString)Read the attributes of the object at name in the HDF5 file filename, returning a Dict.
HDF5.h5writeattr — Functionh5writeattr(filename, name::AbstractString, data::Dict)Write data as attributes to the object at name in the HDF5 file filename.
HDF5.num_attrs — Function