<?php

namespace Tracker;


class TrackerREST extends \Shared\AbstractREST
{
   
    protected function postRespond($data)
    {
        $peerData=json_decode($data["peers"],true);
        if($peerData["reset"]==true)
        {
            // var_dump(\Shared\Settings::$TrackerPeersFile);
            $count=1;
            $f=preg_replace("#..".DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR."#","",\Shared\Settings::$TrackerPeersFile,$count);
            //var_dump($f);
            if(file_exists($f))
            {
                unlink($f);
            }
            touch($f);
            chmod($f,0777);
            return true;
        }
    }
}
