gd_nframes
report the size of a dirfile
- Provided by: libgetdata-dev (Version: 0.7.3-6ubuntu1)
- Source: libgetdata
- Report a bug
report the size of a dirfile
#include <getdata.h>
off_t gd_nframes(DIRFILE *dirfile);
The gd_nframes() function queries a dirfile(5) database specified by dirfile and returns the number of frames in the database. Since different fields may have differing number of frames, the Dirfile Standards (see dirfile(5)) dictate that the number of frames in the database is defined to be equal to the number of frames in the reference field defined by the /REFERENCE directive (see dirfile-format(5)) or, if no such reference field is defined, by the first raw field specified in the format specification.
If no vector fields are defined in the database, gd_nframes() returns zero and succeeds.
The dirfile argument must point to a valid DIRFILE object previously created by a call to gd_open(3).
Upon successful completion, gd_nframes() returns the number of frames in the dirfile. On error, it returns zero and sets the dirfile error to a non-zero error value. Possible error values are:
The dirfile error may be retrieved by calling gd_error(3). A descriptive error string for the last error encountered can be obtained from a call to gd_error_string(3).
dirfile(5), dirfile-encoding(5), gd_open(3), gd_bof(3), gd_eof(3), gd_error(3), gd_error_string(3)