<commit_before>import * as path from 'path';

import { FileSystem } from './FileSystem';

class WebpackFileSystem implements FileSystem {
  pathSeparator: string = path.sep;

  constructor(private fs: any) {}

  isFileInDirectory(filename: string, directory: string): boolean {
    const normalizedFile = this.resolvePath(filename);
    const normalizedDirectory = this.resolvePath(directory);
    return normalizedFile.indexOf(normalizedDirectory) === 0;
  }

  pathExists(filename: string): boolean {
    try {
      this.fs.statSync(filename);
      return true;
    } catch (e) {<commit_msg>fix: ignore directories in SEE LICENSE IN blocks<commit_after>import * as path from 'path';

import { FileSystem } from './FileSystem';

class WebpackFileSystem implements FileSystem {
  pathSeparator: string = path.sep;

  constructor(private fs: any) {}

  isFileInDirectory(filename: string, directory: string): boolean {
    const normalizedFile = this.resolvePath(filename);
    const normalizedDirectory = this.resolvePath(directory);
    return (
      !this.isDirectory(normalizedFile) &&
      normalizedFile.indexOf(normalizedDirectory) === 0
    );
  }

  pathExists(filename: string): boolean {
    try {
      this.fs.statSync(filename);
      return true;
    } catch (e) {
{'fraction_non_alphanumeric': 0.10842433697347893, 'fraction_numerical': 0.0015600624024961, 'mean_word_length': 4.111553784860558, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3916380', 'n_tokens_mistral': 357, 'n_tokens_neox': 349, 'n_words': 92}