1dirfile_flush(3)                    GETDATA                   dirfile_flush(3)
2
3
4

NAME

6       dirfile_flush — write all pending dirfile changes to disk.
7

SYNOPSIS

9       #include <getdata.h>
10
11       int dirfile_flush(DIRFILE *dirfile, const char *field_code);
12

DESCRIPTION

14       The  dirfile_flush() function flushes and closes all file handles asso‐
15       ciated with field_code, or its input(s), in the  dirfile  specified  by
16       dirfile.   If the field_code contains a valid representation suffix, it
17       will be ignored.  As a special case, if field_code is NULL, all  fields
18       in  dirfile will be flushed and closed.  In this special case, modified
19       metadata will also be flushed to disk as  if  dirfile_metaflush(3)  had
20       been called.
21

RETURN VALUE

23       On success, zero is returned.  On error, -1 is returned and the dirfile
24       error is set to a non-zero error value.  Possible error values are:
25
26       GD_E_BAD_CODE
27               The field specified by field_code was not found  in  the  data‐
28               base.
29
30       GD_E_BAD_DIRFILE
31               The supplied dirfile was invalid.
32
33       GD_E_BAD_REPR
34               The  representation  suffix  specified  in  field_code  was not
35               recognised.
36
37       GD_E_RAW_IO
38               An error occurred while trying to flush or close the field(s).
39
40       The dirfile error may be retrieved by calling get_error(3).  A descrip‐
41       tive error string for the last error encountered can be obtained from a
42       call to get_error_string(3).
43

SEE ALSO

45       dirfile_open(3), dirfile_close(3), dirfile_metaflush(3),  get_error(3),
46       get_error_string(3)
47
48
49
50Version 0.6.0                   19 October 2009               dirfile_flush(3)
Impressum