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

Symlinks and hardlinks are reported as files on linux #69

Open
DanielCodesphere opened this issue Feb 13, 2025 · 1 comment
Open

Symlinks and hardlinks are reported as files on linux #69

DanielCodesphere opened this issue Feb 13, 2025 · 1 comment

Comments

@DanielCodesphere
Copy link

Instead of hard_link or sym_link the path_type is always file.

If i do ln -s a b in the watched directory i get create file b and no associatedPathName.

I am most likely using inotify, but i don't know if there is a way to tell for sure.
Maybe the watcher could say that in the self/live event?

@e-dant
Copy link
Owner

e-dant commented Feb 17, 2025

Maybe the watcher could say that in the self/live event?

I've been hesitant to add that because the primary use is debugging (IOW, I'm hesitant to add any debugging stuff to actually released code). But this has come up before, so maybe we should add it.

There are times it's probably useful.

It is especially useful to know how the watcher selects a filesystem even subsystem a-priori (and we document that in the Platform-specific adapter selection subsection). It's a bit hidden, admittedly.

The reason it might be useful to know that before the watcher runs is because of file descriptor limitations on inotify. If someone wants to change that, they should also know if the watcher will use inotify.

Although, which filesystem event subsystem is in use at runtime is probably useful for checking that the watcher is doing with what it is expected to do. And maybe that's not solely debugging.

Instead of hard_link or sym_link the path_type is always file.

I am still investigating the best solution, and I have not forgotten about this.

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

No branches or pull requests

2 participants