directory icon indicating copy to clipboard operation
directory copied to clipboard

FR: a variant of getModificationTime that works on symlinks

Open fgaz opened this issue 1 year ago • 1 comments

$ 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

fgaz avatar Jun 09 '23 08:06 fgaz

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.

Rufflewind avatar Jun 10 '23 21:06 Rufflewind