MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / FileSystem

Method FileSystem

libminifi/src/utils/file/FileSystem.cpp:31–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29namespace file {
30
31FileSystem::FileSystem(bool should_encrypt_on_write, utils::optional<utils::crypto::EncryptionProvider> encryptor)
32 : should_encrypt_on_write_(should_encrypt_on_write),
33 encryptor_(std::move(encryptor)) {
34 if (should_encrypt_on_write_ && !encryptor) {
35 std::string err_message = "Requested file encryption but no encryption utility was provided";
36 logger_->log_error(err_message.c_str());
37 throw std::invalid_argument(err_message);
38 }
39}
40
41utils::optional<std::string> FileSystem::read(const std::string& file_name) {
42 std::ifstream input{file_name, std::ios::binary};

Callers

nothing calls this directly

Calls 2

log_errorMethod · 0.80
c_strMethod · 0.80

Tested by

no test coverage detected