diff options
author | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2019-06-25 17:39:35 (GMT) |
---|---|---|
committer | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2019-06-25 17:39:35 (GMT) |
commit | 35c9af8371c4da7f5327c76ddab097b442128f59 (patch) | |
tree | d51be51c385a9b463388ba154efc3fa37cad49e8 /c++/src/H5File.cpp | |
parent | c752332bfd0e9c3090f3a0c02d0253cd45c2e2ce (diff) | |
parent | 1d8f7bf297100ec11204442708a7f670a89f3f02 (diff) | |
download | hdf5-35c9af8371c4da7f5327c76ddab097b442128f59.zip hdf5-35c9af8371c4da7f5327c76ddab097b442128f59.tar.gz hdf5-35c9af8371c4da7f5327c76ddab097b442128f59.tar.bz2 |
Merge branch 'develop' into parallel_vds_developinactive/parallel_vds_develop
Diffstat (limited to 'c++/src/H5File.cpp')
-rw-r--r-- | c++/src/H5File.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp index 719c1ba..b9ecded 100644 --- a/c++/src/H5File.cpp +++ b/c++/src/H5File.cpp @@ -580,6 +580,27 @@ hsize_t H5File::getFileSize() const } //-------------------------------------------------------------------------- +// Function: H5File::getFileNum +///\brief Returns the file number of the HDF5 file. +///\return File number +///\exception H5::FileIException +///\par Description +/// This function is called after an existing file is opened in +/// order to retrieve the unique 'file number' for the file. +// Programmer Quincey Koziol - April 13, 2019 +//-------------------------------------------------------------------------- +unsigned long H5File::getFileNum() const +{ + unsigned long fileno = 0; + herr_t ret_value = H5Fget_fileno(id, &fileno); + if (ret_value < 0) + { + throw FileIException("H5File::getFileNum", "H5Fget_fileno failed"); + } + return (fileno); +} + +//-------------------------------------------------------------------------- // Function: H5File::getId ///\brief Get the id of this file ///\return File identifier |