<commit_before>package org.basex.build.fs;

import java.io.File;
import java.io.IOException;

/**
 * This interface defines events that may occur during a file hierarchy
 * traversal.
 *
 * To get notified about an event during a file hierarchy traversal implement
 * this interface and register to (@see FSWalker).
 * <ul>
 * <li>preTraversal (right before the traversal will start)</li>
 * <li>preEvent (before a new directory is entered)</li>
 * <li>postEvent (after a directory is left)</li>
 * <li>regfileEvent (a file is being visited)</li>
 * <li>symlinkEvent (a symbolic link is being visited)</li>
 * <li>postTraversal (right after the traversal)</li>
 * </ul>
 * 
 * @author Workgroup DBIS, University of Konstanz 2005-08, ISC License
 * @author <NAME>
 */
public interface FSVisitor {

  /** Invoked before traversal starts.
   * If more than one file hierarchy is to be imported (for example
   * 'Import all...' on Windows gets C:, D: ...), you have to indicate
   * the very first traversal to construct a document node.
   * @param path the traversal starts from.
   * @param docOpen indicates if this is also the beginning of the document.
   * @throws IOException I/O exception
   */
  void preTraversal(final String path, boolean docOpen) throws IOException;

  /** Invoked before directory is entered. 
   * @param dir name
   * @throws IOException I/O exception
   */
  void preEvent(final File dir) throws IOException;

  /** Invoked when directory is left.
   * @throws IOException I/O exception
   */
  void postEvent() throws IOException;

  /** Invoked when a regular file is visited.
   * @param file name
   * @throws IOException I/O exception
   */
  void regfileEvent(final File file) throws IOException;

  /** Invoked when a symbolic link is visited.
   * @param link to be visited.
   */
  void symlinkEvent(File link);

  /** Invoked after the traversal.
   * @param docClose indicates if the document is to be closed.
   * @throws IOException I/O exception
   */
  void postTraversal(boolean docClose) throws IOException;
}<commit_msg>dir postEvent with argument added<commit_after>package org.basex.build.fs;

import java.io.File;
import java.io.IOException;

/**
 * This interface defines events that may occur during a file hierarchy
 * traversal.
 *
 * To get notified about an event during a file hierarchy traversal implement
 * this interface and register to (@see FSWalker).
 * <ul>
 * <li>preTraversal (right before the traversal will start)</li>
 * <li>preEvent (before a new directory is entered)</li>
 * <li>postEvent (after a directory is left)</li>
 * <li>regfileEvent (a file is being visited)</li>
 * <li>symlinkEvent (a symbolic link is being visited)</li>
 * <li>postTraversal (right after the traversal)</li>
 * </ul>
 * 
 * @author Workgroup DBIS, University of Konstanz 2005-08, ISC License
 * @author <NAME>
 */
public interface FSVisitor {

  /** Invoked before traversal starts.
   * If more than one file hierarchy is to be imported (for example
   * 'Import all...' on Windows gets C:, D: ...), you have to indicate
   * the very first traversal to construct a document node.
   * @param path the traversal starts from.
   * @param docOpen indicates if this is also the beginning of the document.
   * @throws IOException I/O exception
   */
  void preTraversal(final String path, boolean docOpen) throws IOException;

  /** Invoked before directory is entered. 
   * @param dir name
   * @throws IOException I/O exception
   */
  void preEvent(final File dir) throws IOException;

  /** Invoked when directory is left.
   * @throws IOException I/O exception
   */
  void postEvent() throws IOException;
  
  /** Invoked when directory is left.
   * @param dir name
   * @throws IOException I/O exception
   */
  void postEvent(final File dir) throws IOException;

  /** Invoked when a regular file is visited.
   * @param file name
   * @throws IOException I/O exception
   */
  void regfileEvent(final File file) throws IOException;

  /** Invoked when a symbolic link is visited.
   * @param link to be visited.
   */
  void symlinkEvent(File link);

  /** Invoked after the traversal.
   * @param docClose indicates if the document is to be closed.
   * @throws IOException I/O exception
   */
  void postTraversal(boolean docClose) throws IOException;
}
{'fraction_non_alphanumeric': 0.09541454377026401, 'fraction_numerical': 0.002779064381658175, 'mean_word_length': 3.5036496350364965, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5379938', 'n_tokens_mistral': 1237, 'n_tokens_neox': 1195, 'n_words': 514}