On Mon, Jan 4, 2021 at 3:19 AM James Richters via fpc-pascal <[email protected]> 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 - [email protected] https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
