Phantom Documentation

[Help Home] [Phantom Home]
OpenFile (Deprecated)
bool OpenFile(file,string,string)

Return Type: bool
Parameters: file Handle, string Path, string Mode

Description:
OpenFile opens a text file, indicated by Path for reading, writing, or appending. Files must be opened using this function with the correct flag prior to performing other file operations. Future file operations are performed using the file handle represented by the Handle parameter passed to this function. The different modes, set by the Mode parameter are:



w - The file is open for write access.
r - The file is open for read access.
a - The file is open for append access.



ReadFile requires the ‘r’ mode, and WriteFile requires the ‘w’ or ‘a’ modes. All file handles opened using OpenFile must be closed by CloseFile after file operations are complete. Note that the Path can either be an absolute path or a relative path.



Note: This function is included for compatibility with previous versions of Phantom. The OpenFile function returning a 'file' should be used instead.


Copyright 2000-2011 Phantom Automated Solutions