MCPcopy Create free account
hub / github.com/amsynth/amsynth / copy

Method copy

src/core/filesystem.cpp:120–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120bool filesystem::copy(const std::string &from, const std::string &to)
121{
122 std::ifstream input(from.c_str(), std::ios::in | std::ios::binary);
123 if (!input.is_open()) {
124 return false;
125 }
126 std::ofstream output(to.c_str(), std::ios::out | std::ios::binary);
127 output << input.rdbuf();
128 return true;
129}
130
131bool filesystem::create_dir(const std::string &path)
132{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected