Boost V3 file system does not provide touch(1) ;
Even touch will creat + close the file, just look at strace output:
open("/tmp/q", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK, 0666) = 47 dup2(47, 0) = 0 close(47) = 0 utimensat(0, NULL, NULL, 0) = 0
I think your most reasonable bet is to simply create a wrapper function that closes the file.
source share