CFile:FilePos
The FilePos method returns the byte offset of the file read/write pointer.
nPos = CFile:FilePos() |
The value returned by FilePos is a byte offset from the beginning of the file as seen by the operating system. If the file is translated to text mode when written to the file, then this value differs from the actual byte offset in the file.
Suppose a CFile F exists and that the file is empty. The following script fragment writes a string to it and then returns the file position after the write operation:
|
|
|
-- result: pos = 8 |