1XDF_OPEN(3)                xdffileio library manual                XDF_OPEN(3)
2
3
4

NAME

6       xdf_open - Open a xDF file for reading or writing
7

SYNOPSIS

9       #include <xdfio.h>
10
11       struct xdf* xdf_open(const char* filename, int mode,
12                            enum xdffiletype type);
13

DESCRIPTION

15       xdf_open()  opens a xDF the file refered by the path filename for read‐
16       ing or writing.
17
18       If mode is XDF_READ, the file is opened for reading. Thus it must exist
19       and  type  should be either XDF_ANY or set to the type of the file ref‐
20       ered by type. Otherwise, the function will fail.
21
22       If mode is XDF_WRITE, the file is opened for  writing.  Thus  the  path
23       filename  must  not refered to an existing file: the function will fail
24       if the file exist. This behavior prevents  to  overwrite  any  previous
25       recording.  type should be also be set to the desired type of data for‐
26       mat (XDF_ANY will result in a error).
27
28       The possible file type values are defined in the header file <xdfio.h>
29

RETURN VALUE

31       The function returns an handle to xDF file opened in case  of  success.
32       Otherwise, NULL is returned and errno is set appropriately.
33

ERRORS

35       In  addition  to the errors related to calls to open(3) or read(3), the
36       following errors can occur:
37
38       EILSEQ The file that is being opened does not correspond to a supported
39              file format or is not of the type specified.
40
41       ENOMEM The system is unable to allocate resources.
42
43       EINVAL mode is neither XDF_READ nor XDF_WRITE, or filename is NULL.
44

SEE ALSO

46       xdf_close(3)
47
48
49
50
51
52EPFL                                 2010                          XDF_OPEN(3)
Impressum