Function StrFile() Foundation

Writes a string to a file starting at a specified position.

Syntax
StrFile( <cString>        , ;
         <cFileName>      , ;
         [<lOverWrite>]   , ;  // Default: .F.
         [<nStartOffSet>] , ;  // Default: End of file
         [<lTruncateFile>]  ;  // Default: .F.
       ) --> nBytesWritten
Return

Returns the number of bytes written to the file as a numeric value.

Description

<cString>

A string to be written to <cFileName>

<cFileName>

A string with the name of the file to be written to.

<lOverWrite>

By default the file <cFilename> is created when calling FileStr(). To write the string to an existing file <lOverWrite> must be set .T.

<nStartOffSet>

This specifies the number of bytes to be skipped before writing to the file. It defaults to the last byte, meaning the string is written to the end of the file by default.

<lTruncateFile>

If this parameter is set .T. the file is truncated to the current position of the file pointer when the write operation is complete.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.