MCPcopy Create free account
hub / github.com/OSGeo/gdal / VSICopyFile

Function VSICopyFile

port/cpl_vsil.cpp:963–985  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

961 */
962
963int VSICopyFile(const char *pszSource, const char *pszTarget,
964 VSILFILE *fpSource, vsi_l_offset nSourceSize,
965 const char *const *papszOptions, GDALProgressFunc pProgressFunc,
966 void *pProgressData)
967
968{
969 if (!pszSource && !fpSource)
970 {
971 CPLError(CE_Failure, CPLE_AppDefined,
972 "pszSource == nullptr && fpSource == nullptr");
973 return -1;
974 }
975 if (!pszTarget || pszTarget[0] == '\0')
976 {
977 return -1;
978 }
979
980 VSIFilesystemHandler *poFSHandlerTarget =
981 VSIFileManager::GetHandler(pszTarget);
982 return poFSHandlerTarget->CopyFile(pszSource, pszTarget, fpSource,
983 nSourceSize, papszOptions, pProgressFunc,
984 pProgressData);
985}
986
987/************************************************************************/
988/* VSICopyFileRestartable() */

Callers 4

CopySingleMethod · 0.85
CPLCopyFileFunction · 0.85
OpenMethod · 0.85
VSIMoveFunction · 0.85

Calls 2

CPLErrorFunction · 0.85
CopyFileMethod · 0.45

Tested by

no test coverage detected