Qt has a QFile::resize(bt) method that sets the file size to bt, cutting everything that goes on. Is there an analogue (and, in general, is it “legally” to do that), which cuts a file on bt from the beginning?
Context of the task: there is generally a third-party process that puts logs in the file file , so synchronize by accessing the file will not work. When I receive records, I need to read the file, parse everything that is written there, and cut the read data (written to another file). Of course, this is required to be done synchronously in order not to lose anything. So far I have thought of only the version voiced above.