예제 #1
0
 /**
  * Opens a file.
  *
  * @param $file
  *
  * @return null|string
  */
 public static function OpenFile($file)
 {
     if (FileMethods::FileExists($file)) {
         /**
          * Opens that file
          */
         return file_get_contents($file);
     }
     /**
      * File does not exist
      */
     return null;
 }
예제 #2
0
 /**
  * Reads the saved path.
  *
  * @param $correct_path
  *
  * @return mixed|null
  */
 private static function ReadSavedPath($correct_path)
 {
     if (FileMethods::FileExists($correct_path . "Json/resource/filepath.json")) {
         return JsonReader::ReadFile($correct_path . "Json/resource/filepath.json");
     }
     return null;
 }
예제 #3
0
 /**
  * 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;
 }