sapling/eden/fs/store/BlobMetadata.h
Chad Austin 49385c8a07 store: namespace facebook::eden
Summary: C++17

Reviewed By: fanzeyi

Differential Revision: D28966939

fbshipit-source-id: c8c9d49bc02557263a6acf9357c90b50e04fbdb9
2021-06-08 19:29:37 -07:00

29 lines
566 B
C++

/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This software may be used and distributed according to the terms of the
* GNU General Public License version 2.
*/
#pragma once
#include <cstdint>
#include "eden/fs/model/Hash.h"
namespace facebook::eden {
/**
* A small struct containing both the size and the SHA-1 hash of
* a Blob's contents.
*/
class BlobMetadata {
public:
BlobMetadata(Hash contentsHash, uint64_t fileLength)
: sha1(contentsHash), size(fileLength) {}
Hash sha1;
uint64_t size;
};
} // namespace facebook::eden