sapling/eden/fs/utils/FileHash.h
John Elliott 108b57fc36 Move FileUtils and PathFuncs from eden to edencommon
Summary:
To support better telemetry and logging in watchman we want to use Eden's components. Lets migrate and detangle the needed pieces.

This change moves FileUtils and PathFuncs from eden to edencommon.

NOTE: FileUtils and PathFuncs are mutally dependent so they were migrated togehter. Most of the files touched, however, was due to PathFuncs.

Reviewed By: genevievehelsel

Differential Revision: D54393041

fbshipit-source-id: 6dc404b1b1066704584da512220475e9ee486247
2024-03-01 18:09:03 -08:00

29 lines
664 B
C++

/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This software may be used and distributed according to the terms of the
* GNU General Public License version 2.
*/
#pragma once
#include <optional>
#include "eden/common/utils/PathFuncs.h"
#include "eden/fs/model/Hash.h"
namespace facebook::eden {
#ifdef _WIN32
/** Compute the sha1 of the file */
Hash20 getFileSha1(AbsolutePathPiece filePath, bool windowsSymlinksEnabled);
/** Compute the blake3 of the file */
Hash32 getFileBlake3(
AbsolutePathPiece filePath,
const std::optional<std::string>& maybeBlake3Key,
bool windowsSymlinksEnabled);
#endif
} // namespace facebook::eden