I want to replace the content of an existing file (keeping the type and rights). I used:
fs := TFileStream.Create(Filename, fmOpenWrite or fmShareDenyNone); fs.Size := 0; fs.Write(.....); fs.Free; But it does not always work. The line fs.Size does not clear the file on every file system. So the fs.Write only replaces the first part of the file. See http://bugs.freepascal.org/view.php?id=13931 Any idea, what to do instead? Mattias _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal