<commit_before><?php

/**
 * File Handle class
 * @author <NAME>
 * @description Class for handling files
 */

namespace Warp\Utils;

class FileHandle
{
	protected $handle;

	public function __construct($name, $path=null)
	{
		$this->handle = fopen($path."/".$name, "a");
	}

	public static function Exists($name, $path)
	{
		return file_exists($path."/".$name);
	}

	public static function Delete($name, $path)
	{
		unlink($path."/".$name);
	}

	public function Read()
	{
		return fread($this->handle);
	}

	public function Write($text)
	{
		fwrite($this->handle, $text);
	}

	public function WriteLine($text)
	{
		fwrite($this->handle, $text . "\n");
	}

	public function Close()
	{
		fclose($this->handle);
	}
}
<commit_msg>Fixed filehandle<commit_after><?php

/**
 * File Handle class
 * @author <NAME>
 * @description Class for handling files
 */

namespace Warp\Utils;

class FileHandle
{
	protected $handle;
	protected $filename;

	public function __construct($name, $path=null)
	{
		$this->filename = $path."/".$name;
		$this->handle = fopen($this->filename, "a");
	}

	public static function Exists($name, $path)
	{
		return file_exists($path."/".$name);
	}

	public static function Delete($name, $path)
	{
		unlink($path."/".$name);
	}

	public function Read()
	{
		return fread($this->handle, filesize($this->filename));
	}

	public function Write($text)
	{
		fwrite($this->handle, $text);
	}

	public function WriteLine($text)
	{
		fwrite($this->handle, $text . "\n");
	}

	public function Close()
	{
		fclose($this->handle);
	}
}

{'fraction_non_alphanumeric': 0.18146467919637072, 'fraction_numerical': 0.0, 'mean_word_length': 3.948717948717949, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 18, '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': '6861816', 'n_tokens_mistral': 577, 'n_tokens_neox': 549, 'n_words': 120}