summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Fff.f90
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-10-07 13:32:32 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-10-07 13:32:32 (GMT)
commitf766b32d07fae4562e95b9166255c35c8f3e467a (patch)
tree59aa2706ca5c91e1ac4c314a9de9b48f8979dc40 /fortran/src/H5Fff.f90
parent259247fc328fa17b705fc16ab8e004d8c5814ea8 (diff)
downloadhdf5-f766b32d07fae4562e95b9166255c35c8f3e467a.zip
hdf5-f766b32d07fae4562e95b9166255c35c8f3e467a.tar.gz
hdf5-f766b32d07fae4562e95b9166255c35c8f3e467a.tar.bz2
[svn-r7559] Purpose:
Add feature Description: Add H5Fget_freespace() routine, to check the amount of free space in a file. This information is only valid until the file is closed currently, however (until we start recording the free space information in the file itself). Platforms tested: FreeBSD 4.9 (sleipnir) h5committest
Diffstat (limited to 'fortran/src/H5Fff.f90')
-rw-r--r--fortran/src/H5Fff.f9052
1 files changed, 52 insertions, 0 deletions
diff --git a/fortran/src/H5Fff.f90 b/fortran/src/H5Fff.f90
index 90a5a97..24e3945 100644
--- a/fortran/src/H5Fff.f90
+++ b/fortran/src/H5Fff.f90
@@ -802,4 +802,56 @@
hdferr = h5fget_obj_ids_c(file_id, obj_type, max_objs, obj_ids)
END SUBROUTINE h5fget_obj_ids_f
+
+!----------------------------------------------------------------------
+! Name: h5fget_freespace_f
+!
+! Purpose: Get amount of free space within a file
+!
+! Inputs:
+! file_id - file identifier
+! Outputs:
+! free_space - amount of free space in file
+! hdferr: - error code
+! Success: 0
+! Failure: -1
+! Optional parameters:
+! NONE
+!
+! Programmer: Quincey Koziol
+! October 7, 2003
+!
+! Modifications:
+!
+! Comment:
+!----------------------------------------------------------------------
+
+ SUBROUTINE h5fget_freespace_f(file_id, free_space, hdferr)
+!
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5fget_freespace_f
+!DEC$endif
+!
+
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier
+ INTEGER(HSSIZE_T), INTENT(OUT) :: free_space
+ !amount of free space in file
+ INTEGER, INTENT(OUT) :: hdferr ! Error code
+
+ INTERFACE
+ INTEGER FUNCTION h5fget_freespace_c(file_id, free_space)
+ USE H5GLOBAL
+ !DEC$ IF DEFINED(HDF5F90_WINDOWS)
+ !MS$ATTRIBUTES C,reference,alias:'_H5FGET_FREESPACE_C':: h5fget_freespace_c
+ !DEC$ ENDIF
+ INTEGER(HID_T), INTENT(IN) :: file_id
+ INTEGER(HSSIZE_T), INTENT(OUT) :: free_space
+ END FUNCTION h5fget_freespace_c
+ END INTERFACE
+
+ hdferr = h5fget_freespace_c(file_id, free_space)
+
+ END SUBROUTINE h5fget_freespace_f
END MODULE H5F