/** * Because I kept writing this a lot * * @param $file * * @return mixed|null */ public static function PathRead($file) { $file = JsonReader::GetRawFile(PathFinder::Path($file)); if ($file != null) { return json_decode($file, true); } return null; }
/** * Read tor exit points. * * @return mixed|null */ public static function ReadTorExitPoints() { if (FileMethods::FileExists(PathFinder::Path('Json/resources/tor_exit_points.json'))) { return JsonReader::PathRead('Json/resources/tor_exit_points.json'); } return null; }
/** * Again, because I was writing this quite a bit haha! * * @param $file * * @param $contents * * @return null */ public static function PathWrite($file, $contents) { return JsonWriter::Write(PathFinder::Path($file), $contents); }