65 explicit File(
const std::string& filename,
77 File(
const std::string& filename,
85 const std::string&
getName()
const;
99#if H5_VERSION_GE(1, 10, 1)
101 H5F_fspace_strategy_t getFileSpaceStrategy()
const;
104 hsize_t getFileSpacePageSize()
const;
116 return details::get_plist<FileCreateProps>(*
this, H5Fget_create_plist);
121 return details::get_plist<FileAccessProps>(*
this, H5Fget_access_plist);
140 mutable std::string _filename{};
147 using int_t = std::underlying_type<File::AccessMode>::type;
148 return static_cast<File::AccessMode>(
static_cast<int_t
>(lhs) |
static_cast<int_t
>(rhs));
152 using int_t = std::underlying_type<File::AccessMode>::type;
153 return static_cast<File::AccessMode>(
static_cast<int_t
>(lhs) &
static_cast<int_t
>(rhs));
157 using int_t = std::underlying_type<File::AccessMode>::type;
158 return static_cast<File::AccessMode>(
static_cast<int_t
>(lhs) ^
static_cast<int_t
>(rhs));
162 using int_t = std::underlying_type<File::AccessMode>::type;
Definition H5Annotate_traits.hpp:18
File class.
Definition H5File.hpp:25
FileCreateProps getCreatePropertyList() const
Get the list of properties for creation of this file.
Definition H5File.hpp:115
size_t getFileSize() const
Get the size of this file in bytes.
Definition H5File_misc.hpp:128
static constexpr AccessMode Truncate
Definition H5File.hpp:51
static constexpr AccessMode Create
Definition H5File.hpp:54
std::pair< H5F_libver_t, H5F_libver_t > getVersionBounds() const
Returns the HDF5 version compatibility bounds.
Definition H5File_misc.hpp:99
void flush()
flush
Definition H5File_misc.hpp:124
static constexpr AccessMode ReadOnly
Definition H5File.hpp:49
size_t getFreeSpace() const
Get the amount of tracked, unused space in bytes.
Definition H5File_misc.hpp:134
AccessMode
Definition H5File.hpp:29
@ Excl
Open flag: Open will fail if file already exist.
@ ReadOnly
Open flag: Read only access.
@ OpenOrCreate
Derived open flag: Opens RW or exclusively creates.
@ Create
Open flag: Create non existing file.
@ ReadWrite
Open flag: Read Write access.
@ Debug
Open flag: Open in debug mode.
@ Truncate
Open flag: Truncate a file if already existing.
@ Overwrite
Derived open flag: common write mode (=ReadWrite|Create|Truncate)
FileAccessProps getAccessPropertyList() const
Get the list of properties for accession of this file.
Definition H5File.hpp:120
hsize_t getMetadataBlockSize() const
Returns the block size for metadata in bytes.
Definition H5File_misc.hpp:94
static constexpr AccessMode Excl
Definition H5File.hpp:52
static const ObjectType type
Definition H5File.hpp:27
static constexpr AccessMode OpenOrCreate
Definition H5File.hpp:56
const std::string & getName() const
Return the name of the file.
Definition H5File_misc.hpp:85
static constexpr AccessMode ReadWrite
Definition H5File.hpp:50
static constexpr AccessMode Overwrite
Definition H5File.hpp:55
static constexpr AccessMode Debug
Definition H5File.hpp:53
std::string getPath() const noexcept
Object path of a File is always "/".
Definition H5File.hpp:89
NodeTraits: Base class for Group and File.
Definition H5Node_traits.hpp:28
Definition H5Object.hpp:35
Object()
Definition H5Object_misc.hpp:19
Definition H5Path_traits.hpp:16
HDF5 property Lists.
Definition H5PropertyList.hpp:158
static const PropertyList< T > & Default() noexcept
Return the Default property type object.
Definition H5PropertyList.hpp:176
Definition assert_compatible_spaces.hpp:15
File::AccessMode operator&=(File::AccessMode &lhs, File::AccessMode rhs)
Definition H5File.hpp:171
bool any(File::AccessMode mode)
Definition H5File.hpp:181
File::AccessMode operator^=(File::AccessMode &lhs, File::AccessMode rhs)
Definition H5File.hpp:176
File::AccessMode operator~(File::AccessMode mode)
Definition H5File.hpp:161
DataTypeClass operator|(DataTypeClass lhs, DataTypeClass rhs)
Definition H5DataType.hpp:46
DataTypeClass operator&(DataTypeClass lhs, DataTypeClass rhs)
Definition H5DataType.hpp:51
ObjectType
Enum of the types of objects (H5O api)
Definition H5Object.hpp:24
const File::AccessMode & operator|=(File::AccessMode &lhs, File::AccessMode rhs)
Definition H5File.hpp:166
File::AccessMode operator^(File::AccessMode lhs, File::AccessMode rhs)
Definition H5File.hpp:156