mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
49385c8a07
Summary: C++17 Reviewed By: fanzeyi Differential Revision: D28966939 fbshipit-source-id: c8c9d49bc02557263a6acf9357c90b50e04fbdb9
29 lines
566 B
C++
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
|