public function getPathForDocument($id)
{
if (!$this->validateId($id)) {
throw new \Exception(sprintf('`%s` is not a valid document ID.', $id));
}
if ($this->isNestedId($id)) {
$path = DIRECTORY_SEPARATOR . str_replace(self::SEPERATOR, DIRECTORY_SEPARATOR, dirname($id));
} else {
$path = '';
}
return $this->path . $path . DIRECTORY_SEPARATOR . $this->getFilename($id);
}