code: public static function saveToFile($file, $properties) {
          $prop_string = self::saveToString($properties);
  
          $real_file = File::asFile($file);
  
          if (!$real_file->exists()) {
              $real_file->touch();
          }
          $real_file->setContent($prop_string);
      }
docs: Saves the properties to file.
  
  @param mixed  $file a path or a File
  @param array $properties The properties, as an array.
  
  @api