[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Synchronous file IO in Lua?
- From: Tomas Mudrunka <mudrunka@...>
- Date: Mon, 19 Sep 2022 17:40:15 +0200
i have Lua script on Linux that opens file handle using io.open(),
writes to it using :write() and closes it using :close().
I really need way to call fsync() on that file descriptor.
Either as an argument, eg.: file:write(true) file:close(true)
or as separate call file:sync(). Is there way to do that?
If not, can you see this being added in the future?
I know as a workaround i can call os.execute("sync");
But that triggers system wide sync of all files and filesystems, which
is not really desirable.