|
SeekToEnd
int SeekToEnd(string
filename)
Return
Value
Returns the new byte
offset from the beginning of the file if operation successful.
Otherwise, the return value is FAIL.
Parameters
filename
– the name of
the file.
Remarks
Call SeekToEnd function to reposition the pointer to the
end of the file. No data is actually read during the seek.
Package
Plug in module:
nd_fileplg.npl
Example
The following
example demonstrates the use of SeekToEnd.
# Example for SeekToEnd
# Append the string to the end of the
file
string sFileName = "C:\test.txt"
if(SeekToEnd(sFileName) != FAIL)
WriteString(sFileName, "New
text")
endif
CloseFile(sFileName)
|