file_system icon indicating copy to clipboard operation
file_system copied to clipboard

deletion event is known by different names on mac and linux

Open bhanuvrat opened this issue 9 months ago • 1 comments

The linux backend calls it :deleted where as the macos backend calls it :removed.

Should it not be consistent across the library, irrespective of the OS?


[1] https://github.com/falood/file_system/blob/dc8f7d6cd7cfd492ebff7a53a58800c213d457bb/lib/file_system/backends/fs_inotify.ex#L59 [2] https://github.com/falood/file_system/blob/dc8f7d6cd7cfd492ebff7a53a58800c213d457bb/lib/file_system/backends/fs_mac.ex#L84

bhanuvrat avatar Apr 20 '25 09:04 bhanuvrat

Hey @bhanuvrat

This is expected behavior, as each backend provides a different set of events, and the current implementation simply returns each backend's events without processing them. There are two challenges with handling events at the framework level:

Users who are already familiar with various backend implementations (such as inotify) would prefer to retain the system-specific keywords, which also makes debugging easier If we wanted to standardize the return values, we would need to implement a unified set of events, but currently there is no established standard for this. Therefore, for now, we're simply returning each backend's results directly.

falood avatar Apr 21 '25 15:04 falood