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

Expose lstat / read_link_info #34

Closed
yoshi-monster opened this issue Aug 24, 2024 · 1 comment · Fixed by #36
Closed

Expose lstat / read_link_info #34

yoshi-monster opened this issue Aug 24, 2024 · 1 comment · Fixed by #36

Comments

@yoshi-monster
Copy link
Contributor

Hi!

currently there is no way to get the stat object for a symbolic link, outside of knowning that something is a symlink by using is_symlink.

Hayleigh suggested that I use simplifile for my file watcher library, but unfortunately, I would also need to have access to the last modified timestamp / other stat data for the symlink itself, not just the target it points to.

Would this be something you'd consider adding?
Thanks, ~yoshi

@bcpeinhardt
Copy link
Owner

bcpeinhardt commented Aug 24, 2024

Hmmm. The file_info function returns a FileInfo object which includes the last modified time (mtime_seconds since the unix epoch iirc).
What other info were you looking for? We do a custom object because different info is available in different shapes on node vs deno vs bun vs erlang.

Edit: I get it now we're using stat not lstat and you need info about the link not the target. Yeah more utils than is_simlink should definitely be added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants