2021-10-28 02:03:02 +03:00
|
|
|
/*
|
2022-01-05 01:58:22 +03:00
|
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
2021-10-28 02:03:02 +03:00
|
|
|
*
|
|
|
|
* This software may be used and distributed according to the terms of the
|
|
|
|
* GNU General Public License version 2.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2023-06-06 09:41:35 +03:00
|
|
|
#include <optional>
|
|
|
|
|
2024-03-02 05:09:03 +03:00
|
|
|
#include "eden/common/utils/PathFuncs.h"
|
2021-10-28 02:03:02 +03:00
|
|
|
#include "eden/fs/model/Hash.h"
|
|
|
|
|
|
|
|
namespace facebook::eden {
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
/** Compute the sha1 of the file */
|
2023-10-13 04:20:15 +03:00
|
|
|
Hash20 getFileSha1(AbsolutePathPiece filePath, bool windowsSymlinksEnabled);
|
2023-06-06 09:41:35 +03:00
|
|
|
|
|
|
|
/** Compute the blake3 of the file */
|
|
|
|
Hash32 getFileBlake3(
|
|
|
|
AbsolutePathPiece filePath,
|
2023-10-13 04:20:15 +03:00
|
|
|
const std::optional<std::string>& maybeBlake3Key,
|
|
|
|
bool windowsSymlinksEnabled);
|
2021-10-28 02:03:02 +03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
} // namespace facebook::eden
|