MCPcopy Create free account
hub / github.com/GPUOpen-Tools/compressonator / CMP_FileCopy

Function CMP_FileCopy

applications/_plugins/common/cmp_fileio.cpp:99–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99void CMP_FileCopy(std::string& source_file, std::string& destination_file)
100{
101#if defined _CMP_CPP17_ || defined _CMP_CPP14_
102 sfs::copy(source_file, destination_file);
103#else
104 FILE* src = fopen(source_file.c_str(), "rb");
105 if (src == NULL)
106 return;
107
108 FILE* dst = fopen(destination_file.c_str(), "wb");
109 if (dst == NULL)
110 {
111 fclose(src);
112 return;
113 }
114
115 for (int i = getc(src); i != EOF; i = getc(src))
116 {
117 putc(i, dst);
118 }
119
120 fclose(dst);
121 fclose(src);
122#endif
123}
124
125bool CMP_DirExists(const std::string& directory)
126{

Callers 2

CompressDecompressMeshFunction · 0.85
fileio_test.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected