File::SetPosition
Defined in: C4Files.h
Sets the current read/write position for a file.
Prototype
unsigned long SetPosition(long position, FilePositioningMode mode = kFileBegin);
Parameters
position |
The position, in bytes, at which the next read or write operation will take place. The interpretation of this position depends on the value of the mode parameter.
|
mode |
Specifies how the position parameter is interpreted using one of the file positioning modes listed below.
|
Description
The SetPosition function sets the current position within the file, in bytes, at which the next read or write operation will take place. The mode parameter specifies the position relative to which the position parameter is applied and may be one of the following values.
kFileBegin |
The new position is relative to the beginning of the file.
|
kFileCurrent |
The new position is relative to the current position.
|
kFileEnd |
The new position is relative to the end of the file.
|
The return value is the new absolute read/write position.
See Also
File::GetPosition
File::GetSize
|