FileBody::FileBody(const fs::path& path, std::size_t chunk_size)
    : path_(path), chunk_size_(chunk_size), auto_delete_(false), size_(0) {
  size_ = utility::TellSize(path_);
  if (size_ == kInvalidLength) {
    throw Error{ Error::kFileError, "Cannot read the file" };
  }
}
FileBody::FileBody(const fs::path& path, std::size_t chunk_size)
    : path_(path), chunk_size_(chunk_size), auto_delete_(false), size_(0) {
  size_ = utility::TellSize(path_);
  if (size_ == kInvalidLength) {
    throw Error{ Error::kFileError, "Cannot read the file" };
  }
}