Common file functions. More...
#include <stdio.h>
Macros | |
#define | seekFile(file, offset, origin) _fseeki64(file, offset, origin) |
Changes the current file position associated with stream to a new location within the file. | |
#define | tellFile(file) _ftelli64(file) |
Returns the file position indicator for the file stream stream. | |
#define | closeFile(file) fclose(file) |
Closes the given file stream. | |
Common file functions.
#define seekFile | ( | file, | |
offset, | |||
origin ) _fseeki64(file, offset, origin) |
Changes the current file position associated with stream to a new location within the file.
The origin must be one of the following constants defined in stdio.h
[in] | file | file stream to modify |
offset | number of characters to shift the position relative to origin | |
origin | position to which offset is added |
#define tellFile | ( | file | ) | _ftelli64(file) |
Returns the file position indicator for the file stream stream.
If the stream is open in binary mode, the value obtained by this function is the number of bytes from the beginning of the file. If the stream is open in text mode, the value returned by this function is unspecified and is only meaningful as the input to fseek().
[in] | file | file stream to examine |
#define closeFile | ( | file | ) | fclose(file) |
Closes the given file stream.
Any unwritten buffered data are flushed to the OS. Any unread buffered data are discarded. The behavior is undefined if the value of the pointer stream is used after fclose returns.
[in] | file | the file stream to close |