MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / write_file

Method write_file

src/utilities/nbackup/nbackup.cpp:440–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

438}
439
440void NBackup::write_file(FILE_HANDLE &file, void *buffer, FB_SIZE_T bufsize)
441{
442#ifdef WIN_NT
443 DWORD bytesDone;
444 if (WriteFile(file, buffer, bufsize, &bytesDone, NULL) && bytesDone == bufsize)
445 return;
446#else
447 if (write(file, buffer, bufsize) == (ssize_t) bufsize)
448 return;
449#endif
450
451 status_exception::raise(Arg::Gds(isc_nbackup_err_write) <<
452 (&file == &dbase ? dbname.c_str() :
453 &file == &backup ? bakname.c_str() : "unknown") <<
454 Arg::OsError());
455}
456
457void NBackup::seek_file(FILE_HANDLE &file, SINT64 pos)
458{

Callers

nothing calls this directly

Calls 4

raiseFunction · 0.85
GdsClass · 0.85
OsErrorClass · 0.85
c_strMethod · 0.45

Tested by

no test coverage detected