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

Using fswatch to detect new files (Solaris) #228

Closed
SteveHallNNT opened this issue May 3, 2019 · 4 comments
Closed

Using fswatch to detect new files (Solaris) #228

SteveHallNNT opened this issue May 3, 2019 · 4 comments

Comments

@SteveHallNNT
Copy link

Hi,

Can I use fswatch to detect when a file is created in a folder on Solaris? When I monitor a folder it does tell me the folder has changed when I add a file but it doesn't seem to have any details of the new file itself. Changing a pre-existing file works and deleting a file seems OK too.

Disclaimer : when I compiled it I had to comment out references to FILE_TRUNC in fen_monitor.cpp as the compiler didn't seem to know where they were defined. Is this relevant?

Many thanks
Steve H

@foxx
Copy link

foxx commented Sep 1, 2019

Also had to comment these lines out to make fswatch work on Solaris. I'll report back with a PR if it seems stable.

@SteveHallNNT
Copy link
Author

@foxx - can you detect new files being created on Solaris?

@foxx
Copy link

foxx commented Sep 2, 2019

@SteveHallNNT Yeah, Solaris 11 has something3 called File Events Notification.

There does appear to be support in this library for Solaris too, based on the README;

A monitor based on the File Events Notification API of the Solaris kernel and its derivatives.

I haven't tested this library individually, but it seems to be working fine with minio.

@emcrisostomo
Copy link
Owner

The behaviour depends on the monitor. Solaris File Events Notification will tell you that a directory has changed when a file has been created, but won't give you any more details. It's up to the receiver to scan the directory contents and see what file has been created.

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

3 participants