public function setFileFromString($string, $directory, $extensions = array())
    {
        $this->file = $this->getFileFromString($string, $directory, $extensions);
        $this->directory = preg_replace('#/+#', '/', (!is_null($directory) ? $directory : $this->directory).DS);
    }