We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
As in usage place we might have no context information about the parent, and relative path not enough.
The text was updated successfully, but these errors were encountered:
This is how this problem is fixed in one of forks: mingcheng@80c64f1
Sorry, something went wrong.
But that code has a problem: not every event is Path event. Here's my function based on that but with this extra check:
private WatchEvent<?> withAbsolutePath(WatchEvent<?> event, Path fileAbsolutePath) { Class<?> type = event.kind().type(); if (type.isAssignableFrom(Path.class)) { return new WatchEvent<Path>() { @Override public Kind kind() { return event.kind(); } @Override public int count() { return event.count(); } @Override public Path context() { return fileAbsolutePath; } }; } else { return event; } }
No branches or pull requests
As in usage place we might have no context information about the parent, and relative path not enough.
The text was updated successfully, but these errors were encountered: