6.7.23SHOW FILE SIZE
Syntax
SHOW FILE SIZE [file_name [, file_name]*]
[post_processing_option]
[output_redirecting_option]
Description
Show (i.e. get) the size (in bytes) of a file named file_name or of the HDF5 file currently in use. Multiple files’ sizes can be obtained at once by separating their names with a comma (,). If file_name was not found or its size could not be obtained (due to unknown/unexpected reasons), no subsequent files are checked, and an error is raised.
Parameter(s)
file_name – optional string that specifies the name of the file whose size (in bytes) is to be obtained. If file_name is not specified, the size of the (HDF5) file currently in use is returned instead.
post_processing_option – optional option that transforms the result set according to the programmer’s needs, such as ordering or truncating (please refer to the section PROCESSING for additional information).
output_redirecting_option – optional option that specifies the cursor in use, an HDF5 object (i.e. dataset or attribute), a (text, binary, or Excel) file, or memory (i.e. user-defined variable) to write the result set into (please refer to the subsection INTO for additional information). If not specified, the cursor in use is populated with the result set instead (please refer to the chapter CURSOR for additional information).
Return
The size (in bytes) of a file as an HDFQL_BIGINT.
Example(s)
# create an HDF5 file named "my_file.h5"
CREATE FILE my_file.h5
# show (i.e. get) size (in bytes) of file "my_file.h5" (should return 800)
SHOW FILE SIZE my_file.h5
# use (i.e. open) HDF5 file "my_file.h5"
USE FILE my_file.h5
# create an HDF5 group named "my_group"
CREATE GROUP my_group
# flush the entire virtual HDF5 file (global) currently in use
FLUSH
# show (i.e. get) size (in bytes) of the file currently in use (should return greater than 800)
SHOW FILE SIZE