From: John Cowan <>
Date: Wednesday, December 11, 2019 9:10 AM

Actually dirfd() lets you get the fd from a DIR *, so then you can call those "modify metadata by fd" operations on the directory.  Personally, I think all such operations are silly whether on directories or on plain files: if you are munging the metadata of an object, it's not unreasonable to be required to have a valid path to it.

While the data is still likely hot and cached at various levels, getting and resetting the access time metadata when you're backing up a file and have already opened it is presumably faster, the operating system already has direct access through the file descriptor to the inode where this metadata is storied.  Ditto the reverse for restores, where you have a lot more metadata to reset.

(Note that this SRFI, lacking file positioning which gets deeper into the guts of port implementations, can't properly restore files with holes, and it's perhaps missing other necessary features for that use case.)


- Harold