summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Ff.c
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/H5Ff.c
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/H5Ff.c')
-rw-r--r--fortran/src/H5Ff.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/fortran/src/H5Ff.c b/fortran/src/H5Ff.c
index fa1e108..e486698 100644
--- a/fortran/src/H5Ff.c
+++ b/fortran/src/H5Ff.c
@@ -452,3 +452,26 @@ nh5fget_obj_ids_c ( hid_t_f *file_id , int_f *obj_type, int_f *max_objs, hid_t_f
if ( H5Fget_obj_ids(c_file_id, c_obj_type, c_max_objs, (hid_t *)obj_ids) < 0 ) ret_value = -1;
return ret_value;
}
+/*----------------------------------------------------------------------------
+ * Name: h5fget_freespace_c
+ * Purpose: Call H5Fget_freespace to get amount of free space within a file
+ * Inputs: file_id - identifier of the file to query
+ * Returns: free_space - amount of free space in file
+ * 0 on success, -1 on failure
+ * Programmer: Quincey Koziol
+ * Tuesday, October 7, 2003
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+
+int_f
+nh5fget_freespace_c ( hid_t_f *file_id , hssize_t_f *free_space)
+{
+ int ret_value = 0;
+ hid_t c_file_id;
+ hssize_t c_free_space;
+
+ c_file_id = (hid_t)*file_id;
+ if ( (c_free_space=H5Fget_freespace(c_file_id)) < 0 ) ret_value = -1;
+ *free_space=(hssize_t_f)c_free_space;
+ return ret_value;
+}