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

Allow non-portable features #67

Closed
PieterD opened this issue Feb 8, 2015 · 2 comments
Closed

Allow non-portable features #67

PieterD opened this issue Feb 8, 2015 · 2 comments
Labels

Comments

@PieterD
Copy link
Contributor

PieterD commented Feb 8, 2015

Not all operations are available on every platform. Windows doesn't have attrib, kqueue doesn't have create, etc.

I propose a method to determine the capabilities of the library. This would allow us to introduce more events that are not available on every platform, like Close: #22

Perhaps something like err := fsnotify.Capabilities(fsnotify.Create|fsnotify.Write)

Similarly, combined with event filtering in #7, NewWatcher would of course fail if an event is requested that it does not support:
err := fsnotify.NewWatcher("/file/name", fsnotify.Create|fsnotify.Write)

The question then remains, is this filter mandatory? I think it should be.

@PieterD PieterD added the API label Feb 8, 2015
@nathany
Copy link
Contributor

nathany commented Feb 8, 2015

Interesting.

Another proposal is to have something like Sys() interface{} in FileInfo to retrieve the underlying event data (OS specific bitmask).

That doesn't address filtering though.

@arp242 arp242 added feature and removed API labels Jul 29, 2022
@arp242 arp242 changed the title Allow non-portable Ops using Capabilities Allow non-portable features Jan 14, 2023
@arp242
Copy link
Member

arp242 commented Apr 28, 2024

Closing as duplicate of #519 (that one is much newer, but has some useful comments).

Also PR at #629.

@arp242 arp242 closed this as completed Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants