public function getUniqFileName($dir, $name, $sep = '-')
    {
        list($name, $ext) = $this->standardizeFileName($name, true);

        $nameF = $name.'.'.$ext;
        $i = 2;
        while (isset($this->uniqFileNames[$dir.'/'.$nameF]) || file_exists($dir.'/'.$nameF)) {
            $nameF = $name.$sep.$i.'.'.$ext;
            ++$i;
        }
        $this->uniqFileNames[$dir.'/'.$nameF] = true;

        return $nameF;
    }