A couple of examples showing how the Delphi TFieldedText library can be used to read and write files: