Esempio n. 1
0
 /**
  * Because I kept writing this a lot
  *
  * @param $file
  *
  * @return mixed|null
  */
 public static function Read($file)
 {
     $file = JsonReader::GetRawFile(PathFinder::RealPath($file));
     if ($file != null) {
         return json_decode($file, true);
     }
     return null;
 }
Esempio n. 2
0
 /**
  * Read tor exit points.
  *
  * @return mixed|null
  */
 public static function ReadTorExitPoints()
 {
     if (FileMethods::FileExists(PathFinder::RealPath('Json/resources/tor_exit_points.json'))) {
         return JsonReader::Read('Json/resources/tor_exit_points.json');
     }
     return null;
 }
Esempio n. 3
0
 /**
  * Reads the default parser needles
  *
  * @return mixed|null
  */
 public static function ReadDefaults()
 {
     return JsonReader::ReadFile(PathFinder::RealPath("Json/misc/default_parser_needles.json"));
 }
Esempio n. 4
0
 /**
  * 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::RealPath($file), $contents);
 }