Logo Search packages:      
Sourcecode: cabextract version File versions  Download package

struct mspack_file*(* mspack_system::open)(struct mspack_system *self, char *filename, int mode) [read]

Opens a file for reading, writing, appending or updating.

self a self-referential pointer to the mspack_system structure whose open() method is being called. If this pointer is required by close(), read(), write(), seek() or tell(), it should be stored in the result structure at this time.
filename the file to be opened. It is passed directly from the library caller without being modified, so it is up to the caller what this parameter actually represents.
mode one of MSPACK_SYS_OPEN_READ (open an existing file for reading), MSPACK_SYS_OPEN_WRITE (open a new file for writing), MSPACK_SYS_OPEN_UPDATE (open an existing file for reading/writing from the start of the file) or MSPACK_SYS_OPEN_APPEND (open an existing file for reading/writing from the end of the file)
a pointer to a mspack_file structure. This structure officially contains no members, its true contents are up to the mspack_system implementor. It should contain whatever is needed for other mspack_system methods to operate. Returning the NULL pointer indicates an error condition.
See also:
close(), read(), write(), seek(), tell(), message()

Generated by  Doxygen 1.6.0   Back to index