directory
directory copied to clipboard
FR: a variant of getModificationTime that works on symlinks
$ ln -s /invalid invalid
$ ghci
λ import System.Directory
λ getModificationTime "invalid"
*** Exception: invalid: getModificationTime:getFileStatus: does not exist (No such file or directory)
I think it should return the modification time of the link itself
Indeed, getModificationTime
and most functions in directory
by design operate on the destination of symbolic links, not the links themselves.
There are separate system APIs for operating on the links themselves, but they are not (yet) implemented in directory
.