2021-08-05 05:29:38 +03:00
|
|
|
/*
|
2022-01-05 01:58:22 +03:00
|
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
2021-08-05 05:29:38 +03:00
|
|
|
*
|
|
|
|
* This software may be used and distributed according to the terms of the
|
|
|
|
* GNU General Public License version 2.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2022-03-04 04:17:25 +03:00
|
|
|
#include "eden/fs/config/FieldConverter.h"
|
|
|
|
|
2021-08-05 05:29:38 +03:00
|
|
|
namespace facebook::eden {
|
|
|
|
|
|
|
|
enum class MountProtocol {
|
|
|
|
FUSE,
|
|
|
|
PRJFS,
|
|
|
|
NFS,
|
|
|
|
};
|
|
|
|
|
2022-07-14 22:46:22 +03:00
|
|
|
constexpr MountProtocol kMountProtocolDefault =
|
|
|
|
folly::kIsWindows ? MountProtocol::PRJFS : MountProtocol::FUSE;
|
|
|
|
|
2022-03-04 04:17:25 +03:00
|
|
|
template <>
|
|
|
|
class FieldConverter<MountProtocol> {
|
|
|
|
public:
|
|
|
|
folly::Expected<MountProtocol, std::string> fromString(
|
|
|
|
folly::StringPiece value,
|
|
|
|
const std::map<std::string, std::string>& convData) const;
|
|
|
|
|
|
|
|
std::string toDebugString(MountProtocol value) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace facebook::eden
|