public function pathToId($path)
    {
        $extension = pathinfo($path, PATHINFO_EXTENSION);

        return $extension
            ? substr($path, 0, - (strlen($extension) + 1))
            : $path;
    }