Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: a variant of getModificationTime that works on symlinks #155

Open
fgaz opened this issue Jun 9, 2023 · 1 comment
Open

FR: a variant of getModificationTime that works on symlinks #155

fgaz opened this issue Jun 9, 2023 · 1 comment
Labels
type: a-feature-request This is a request for a new feature.

Comments

@fgaz
Copy link
Member

fgaz commented Jun 9, 2023

$ 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

@Rufflewind
Copy link
Member

Rufflewind commented Jun 10, 2023

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 Rufflewind added the type: a-feature-request This is a request for a new feature. label Jun 10, 2023
@Rufflewind Rufflewind changed the title getModificationTime fails on broken symlinks FR: a variant of getModificationTime that works on symlinks Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: a-feature-request This is a request for a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants