src/main/java/com/github/davidmoten/rx/FileObservable.java
@SafeVarargs
    public final static Observable<WatchEvent<?>> from(final File file, Kind<?>... kinds) {
        return from(file, null, kinds);
    }
@SafeVarargs
    public final static Observable<WatchEvent<?>> from(final File file, Kind<?>... kinds) {
        return from(file, null, kinds);
    }
@ SafeVarargs public final static Observable < WatchEvent < ? > > from ( final File file , Kind < ? > ... kinds ) { return from ( file , null , kinds ) ; }
If file does not exist at subscribe time then is assumed to not be a
directory. If the file is not a directory (bearing in mind the aforesaid
assumption) then a {@link WatchService} is set up on its parent and
{@link WatchEvent}s of the given kinds are filtered to concern the file
in question. If the file is a directory then a {@link WatchService} is
set up on the directory and all events are passed through of the given
kinds.

@param file
file to watch
@param kinds
event kinds to watch for and emit
@return observable of watch events
If file does not exist at subscribe time then is assumed to not be a directory . If the file is not a directory ( bearing in mind the aforesaid assumption ) then a { @link WatchService } is set up on its parent and { @link WatchEvent } s of the given kinds are filtered to concern the file in question . If the file is a directory then a { @link WatchService } is set up on the directory and all events are passed through of the given kinds .