def directory_path
      sanitized_path(
        case namespace
        when "collections"
          File.join(collection.relative_directory, params["splat"].first)
        when "data"
          File.join(DataFile.data_dir, params["splat"].first)
        when "drafts"
          File.join("_drafts", params["splat"].first)
        else
          params["splat"].first
        end
      )
    end
def directory_path
      sanitized_path(
        case namespace
        when "collections"
          File.join(collection.relative_directory, params["splat"].first)
        when "data"
          File.join(DataFile.data_dir, params["splat"].first)
        when "drafts"
          File.join("_drafts", params["splat"].first)
        else
          params["splat"].first
        end
      )
    end
Returns the path to the requested file's containing directory