<commit_before>FUNCTION ReadFile$ (filePath$)
  fFile = FREEFILE
  OPEN filePath$ FOR INPUT AS #fFile
  fileContent$ = ""
  WHILE NOT EOF(fFile)
    LINE INPUT #fFile, line$
    fileContent$ = fileContent$ + line$ + CHR$(10)
  WEND
  CLOSE #fFile
  ReadFile$ = fileContent$
  fileContent$ = ""
END FUNCTION

SUB DeleteFile (filePath$)
  KILL (filePath$)
END SUB

FUNCTION WriteFile (filePath$, fileContent$)
  fFile = FREEFILE
  OPEN filePath$ FOR OUTPUT AS #fFile
  PRINT #fFile, fileContent$
  CLOSE #fFile
  WriteFile = 0
END FUNCTION

FUNCTION checkFileExists(filePath$)
  fileContent$ = ReadFile$(filePath$)
  IF LEN(fileContent$) > 0 THEN
    'File exist
    checkFileExists = 0
  ELSE
    'File does not exists or is empty
    checkFileExists = 1
  END IF
  fileContent$ = ""
END FUNCTION<commit_msg>[CORE] Files.bas<commit_after>FUNCTION ReadFile$ (filePath$)
  DIM fFile, fileContent$
  fFile = FREEFILE
  OPEN filePath$ FOR INPUT AS #fFile
  fileContent$ = ""
  WHILE NOT EOF(fFile)
    LINE INPUT #fFile, line$
    fileContent$ = fileContent$ + line$ + CHR$(10)
  WEND
  CLOSE #fFile
  ReadFile$ = fileContent$
  fileContent$ = ""
END FUNCTION

SUB DeleteFile (filePath$)
  KILL (filePath$)
END SUB

FUNCTION checkFileExists (filePath$)
  DIM fileContent$
  fileContent$ = ReadFile$(filePath$)
  IF LEN(fileContent$) > 0 THEN
    'File exist
    checkFileExists = 0
  ELSE
    'File does not exists or is empty
    checkFileExists = 1
  END IF
  fileContent$ = ""
END FUNCTION

FUNCTION WriteFile (filePath$, fileContent$)
  DIM fFile
  fFile = FREEFILE
  OPEN filePath$ FOR OUTPUT AS #fFile
  PRINT #fFile, fileContent$
  CLOSE #fFile
  'Return write result
  WriteFile = checkFileExists(filePath$)
END FUNCTION
{'fraction_non_alphanumeric': 0.09402205455600697, 'fraction_numerical': 0.006384213580963436, 'mean_word_length': 3.842696629213483, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4198720', 'n_tokens_mistral': 614, 'n_tokens_neox': 589, 'n_words': 183}