Example #1
0
  /** Full refresh clears existing resources and watchers and does a clean refresh. */
  private void fullRefresh() throws IOException {
    resolutionsByResource = Maps.newIdentityHashMap();
    childPathsByParentPath = ArrayListMultimap.create();

    maybeInitializeWatchService();

    onNewDirectory(rootDirectory);
  }
Example #2
0
  private void onNewPath(Path path) throws IOException {
    if (Files.isHidden(path)) {
      return;
    }

    if (Files.isRegularFile(path)) {
      onNewFile(path);
    } else {
      onNewDirectory(path);
    }
  }