Attributes
Dictionary interface
HDF5.attrs — Function
attrs(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 — Function
attributes(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 — Type
HDF5.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 — Function
open_attribute(parent::Union{File,Group,Dataset,Datatype}, name::AbstractString)Open the Attribute named name on the object parent.
HDF5.create_attribute — Function
create_attribute(
parent::Union{File,Object},
name::AbstractString,
dtype::Union{Datatype, Type},
dspace::Union{Dataspace, Dims, Nothing}
)Create a new Attribute object named name on the object parent, with the corresponding Datatype and Dataspace.
create_attribute(
parent::Union{File,Object},
name::AbstractString,
data
) -> Attribute, DatatypeCreate a new Attribute object named name on the object parent for the object data, returning both the Attribute and the Datatype.
Note that no data will be written: use write_attribute to write the data.
HDF5.read_attribute — Function
read_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 — Function
write_attribute(parent::Union{File,Object}, name::AbstractString, data)Write data as an Attribute named name on the object parent.
HDF5.delete_attribute — Function
delete_attribute(parent::Union{File,Object}, name::AbstractString)Delete the Attribute named name on the object parent.
HDF5.rename_attribute — Function
rename_attribute(parent::Union{File,Object}, oldname::AbstractString, newname::AbstractString)Rename the Attribute of the object parent named oldname to newname.
Convenience interface
HDF5.h5readattr — Function
h5readattr(filename, name::AbstractString)Read the attributes of the object at name in the HDF5 file filename, returning a Dict.
HDF5.h5writeattr — Function
h5writeattr(filename, name::AbstractString, data::Dict)Write data as attributes to the object at name in the HDF5 file filename.