Small company logo:
   History
 
Advertising banner:
 
 File.OpenFile
Home • Help • Customization Tools • FCAS • Language Reference • File.OpenFile
 
Purpose
Opens, creates, or sends a file on the FCAS computer for reading, writing, and/or downloading.
Syntax
File.OpenFile (Path, OpenConst [, fcBinary | fcText])


Path
The path to a file on the server that is to be opened.
OpenConst
How the file should be opened.
This argument can consist of the following values:
fcRead
Opens a file for reading.
If the file can't be found, the call fails.
fcWrite
Opens a file for writing.
If the file exists, its content is deleted. If the file doesn't exist, a new file is created.
fcAppend
Opens a file for appending without removing the EOF marker before writing new data.
If the file doesn't exist, a new file is created.
fcUpdate
Opens a file for both reading and writing.
If the file can't be found, the call fails.
fcReadWrite
Opens an empty file for both reading and writing.
If the file exists, its content is deleted. If the file doesn't exist, a new file is created.
fcBinary
Opens the file in a mode that assumes the content is binary.
This is the default.
fcText
Opens the file in a mode that assumes the content is readable text in the platform's default character set, or a UTF8 text file with the UTF8 marker. Translation will be done to the proper internal, server, and client character sets.

Example
MyFile.OpenFile ("C:\TEST.TXT", fcWrite)
MyFile.OpenFile ("C:\TEST.TXT", fcRead, fcText)