Quote: "help file for the commands "
Help and I aren't on speaking (or typing terms)...
I dont have a search string option - might be worth adding though. However, it does sound as though you would have an easier time using INI files.
Anyhoo - the mode commands for fopen are (there is also an example on my web site) :
"r"
Opens for reading. If the file does not exist or cannot be found, the fopen call fails.
"w"
Opens an empty file for writing. If the given file exists, its contents are destroyed.
"a"
Opens for writing at the end of the file (appending); creates the file first if it does not exist.
"r+"
Opens for both reading and writing. (The file must exist.)
"w+"
Opens an empty file for both reading and writing. If the given file exists, its contents are destroyed.
"a+"
Opens for reading and appending; creates the file first if it does not exist.
Use the "w" and "w+" types with care, as they can destroy existing files.
When a file is opened with the "a" or "a+" access type, all write operations occur at the end of the file. The file pointer can be repositioned using fseek, but is always moved back to the end of the file before any write operation is carried out. Thus existing data cannot be overwritten. When the "r+", "w+", or "a+" access type is specified, both reading and writing are allowed (the file is said to be open for "update"). However, when switching between reading and writing, there must be an intervening fsetpos, fseek, or rewind operation. The current position can be specified for the fsetpos or fseek operation, if desired. In addition to the above values, one of the following characters can be included in mode to specify the translation mode for new lines:
t
Opens a file in text (translated) mode. In this mode, carriage return–linefeed (CR-LF) combinations are translated into single linefeeds (LF) on input and LF characters are translated to CR-LF combinations on output. Also, CTRL+Z is interpreted as an end-of-file character on input. In files opened for reading or reading/writing, _fsopen checks for a CTRL+Z at the end of the file and removes it, if possible. This is done because using fseek and ftell to move within a file that ends with a CTRL+Z may cause fseek to behave improperly near the end of the file.
b
Opens a file in binary (untranslated) mode; the above translations are suppressed.
The share mode options are :
_SH_DENYNO
Permits read and write access.
_SH_DENYRD
Denies read access to file.
_SH_DENYRW
Denies read and write access to file.
_SH_DENYWR
Denies write access to file.
Mirrors are more fun than television. Well, that was fun, in a not-so-fun sort of way...