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

Function copy_file

libminifi/include/utils/file/FileUtils.h:406–413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

404}
405
406inline int copy_file(const std::string &path_from, const std::string& dest_path) {
407 std::ifstream src(path_from, std::ios::binary);
408 if (!src.is_open())
409 return -1;
410 std::ofstream dest(dest_path, std::ios::binary);
411 dest << src.rdbuf();
412 return 0;
413}
414
415inline void addFilesMatchingExtension(const std::shared_ptr<logging::Logger> &logger, const std::string &originalPath, const std::string &extension, std::vector<std::string> &accruedFiles) {
416#ifndef WIN32

Callers 4

persistPropertiesMethod · 0.85
persistMethod · 0.85
handle_updateMethod · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by 1

mainFunction · 0.68