osdFileOpen

osdFileOpen

osd

1998 12-05


NAME

osdFileOpen - open a file for reading, writing, or both


SYNOPSIS

long osdFileOpen(OSD_File *file, char *filename, long flags)

osdFileOpen() attempts to open a file with the filename specified as filename. file is an OSD_File type which is used to specify the file to other OSD_File operations. When the file is opened the file location pointer (the point from which reading or writing will occur) will be set to the end of the file.


The argument flags is used to specify details about how the file is to be opened. At least one of OSD_FILE_READ or OSD_FILE_WRITE must be specified. Both may be OR'ed together.



OSD_FILE_READ opens the file for reading.
OSD_FILE_WRITE opens the file for writing.
OSD_FILE_ERASE causes the file to be erased if it already exists.


Return TRUE on success and FALSE on failure.


ARGUMENTS


file pointer to a OSD_File
filename name of file to open
flags flags specifying how to open file