code: @Override
      public WatchKey register( WatchService watcher, Kind<?>[] events, Modifier... modifiers ) throws IOException {
          if ( watcher == null ) {
              throw new NullPointerException();
          }
          if ( !(watcher instanceof UnixSshFileSystemWatchService) ) {
              throw new ProviderMismatchException();
          }
          if ( !getFileSystem().provider().readAttributes( this, BasicFileAttributes.class ).isDirectory() ) {
              throw new NotDirectoryException( this.toString() );
          }
          getFileSystem().provider().checkAccess( this, AccessMode.READ );
          return ((UnixSshFileSystemWatchService) watcher).register( this, events, modifiers );
      }
docs: {@inheritDoc}