Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Determine type of file action #24

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

Open
RichardHooijmaijers opened this issue Apr 30, 2025 · 2 comments
Open

Determine type of file action #24

RichardHooijmaijers opened this issue Apr 30, 2025 · 2 comments
Labels
feature a feature request or enhancement

Comments

@RichardHooijmaijers
Copy link

Thanks for this great package! I have previously used powershell (FileSystemWatcher), however this package works much easier. The powershell solution I used before did however have the option to perform different actions based on the type of change. For instance a different function can be called in case a file is changed, created, deleted or renamed.
I was wondering if something similar could be achieved with this package as well? I can find out what happened manually, based on the name of the file. But would be nice if there is a more elegant solution.

@shikokuchuo shikokuchuo added the feature a feature request or enhancement label Apr 30, 2025
@shikokuchuo
Copy link
Member

@RichardHooijmaijers if you're able to describe more your use case / motivation for the above, that would help us in considering this.

As with any type of feature, the more complexity we add, this (i) increases the potential points of failure, and (ii) potentially decreases performance. So the benefits need to clearly outweigh the costs.

@RichardHooijmaijers
Copy link
Author

@shikokuchuo I understand your considerations, and maybe my use case is a bit too specific for general purpose.

In my case I maintain a database with files in a certain directory. In case files are deleted, a different action is performed compared to when new files are created or existing files are changed.
I am able to use watcher right now because I can easily check in the callback function if a file exist or not. As it is just a nice-to-have, I am perfectly fine not implementing such a feature

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

No branches or pull requests

2 participants