I feel like this should be easy, but google is totally failing me at the moment. I want to open a file, or create it if it doesn\'t exist, and write to it.
The followin
If you are just doing something simple, the IOUtils Unit is a lot easier. It has a lot of utilities for writing to files.
e.g.
procedure WriteAllText(const Path: string; const Contents: string); overload; static;
Creates a new file, writes the specified string to the file, and then closes the file. If the target file already exists, it is overwritten.