On Mon, Jan 4, 2021 at 3:19 AM James Richters via fpc-pascal <fpc-pascal@lists.freepascal.org> wrote:
> I suspect that I happen to see the file is there and try to read it before > the program that created the file is done writing it. > What is the proper way to detect the file is in use so I don't bother trying > to open it until it's done being written? Simple approach? Use filemode = fmOpenRead and use a try..except block to open the file? Opening will fail if the file is locked by another process (triggering the exception). -- Bart _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal