mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
93d3a6238d
Add the capability for all revng tooling to run with an S3-backed workdir.
22 lines
579 B
C++
22 lines
579 B
C++
/// \file StorageClient.cpp
|
|
/// \brief Opaque interface to file-related operations
|
|
|
|
//
|
|
// This file is distributed under the MIT License. See LICENSE.md for details.
|
|
//
|
|
|
|
#include "revng/Storage/StorageClient.h"
|
|
|
|
#include "LocalStorageClient.h"
|
|
#include "S3StorageClient.h"
|
|
|
|
llvm::Expected<std::unique_ptr<revng::StorageClient>>
|
|
revng::StorageClient::fromPathOrURL(llvm::StringRef URL) {
|
|
revng_assert(not URL.empty());
|
|
if (S3StorageClient::isS3URL(URL)) {
|
|
return S3StorageClient::fromURL(URL);
|
|
} else {
|
|
return std::make_unique<revng::LocalStorageClient>(URL);
|
|
}
|
|
}
|