Thank you very much again Lutz for your help. I ran your demo with a mounted WebDAV-folder as destination and the result was:
2026-05-24 17:56:02.843 Start
2026-05-24 17:56:05.741 BlockWrite is done
<<3,0>>
2026-05-24 17:56:06.477 fpFsync is done
so fpFsync() waited only 736 ms, although the transfer of 625 MB needed about 164 seconds. So Unix.fpFsync() is really not usable for my purpose.
Has someone another idea, how I can wait, until an upload via WebDAV (using the Cache) is really completed?
E.g. when I disconnect the WebDAV connection by the 'umount' command, then, if an upload is active, the disconnect
automatically waits, until the upload is completed, before the connection is disconnected. That means, "some part inside" must be able to detect the active upload...
Maybe is it possible to query some special "status" of the destination file?