Newbie question: I'm looking for a robust and multiplatform functionality for handling file access.
Basically I would like the functionality to make file access less low level and provide:
Does file already exist? (flag must hold this info, say
FileAlreadyExists).
If file doesn't exist, try to create it.
Flag if creation was successful or not (
FileCreatedSuccessfully)
Flag if file is readable or not (
FileReadable).
Flag if file is writable or not (
FileWritable).
And off course enable writing and reading strings to/from file (one line at a time) (
ReadL,
WriteL) with proper indications of success or failure.
Target is to handle log files (text) and csv files (text), so basically text files in both cases (utf8 formatted). Attached is an attempt that doesn't seem to work (log file never gets created)?
Later I discovered
http://wiki.freepascal.org/File_Handling_In_Pascal (I assume it is up to date) but, as mentioned above, I would like a little extra functionality on top of this. I guess next step is to give
TFilestream an attempt, but first I would like to understand why attached doesn't work?
Regards,
Michael