get_nframes (3) - Linux Manuals
get_nframes: report the size of a dirfile
NAME
get_nframes --- report the size of a dirfileSYNOPSIS
#include <getdata.h>- off_t get_nframes(DIRFILE *dirfile);
DESCRIPTION
If no vector fields are defined in the database, get_nframes() returns zero and succeeds.
The dirfile argument must point to a valid DIRFILE object previously created by a call to dirfile_open(3).
RETURN VALUE
Upon successful completion, get_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:- GD_E_BAD_DIRFILE
- The supplied dirfile was invalid.
- GD_E_RAW_IO
- An attempt to stat(2) the file associated with first raw field defined in the format failed.
- GD_E_UNSUPPORTED
- Reading from dirfiles with the encoding scheme of the specified dirfile is not supported by the library. See dirfile-encoding(5) for details on dirfile encoding schemes. The dirfile error may be retrieved by calling get_error(3). A descriptive error string for the last error encountered can be obtained from a call to get_error_string(3).
SEE ALSO
dirfile(5), dirfile-encoding(5), dirfile_open(3), getdata(3), get_error(3), get_error_string(3)