Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

void Impala::Util::FileCopyLocalToRemote ( std::string  localFileName,
std::string  remoteFileName 
) [inline]

Definition at line 14 of file FileCopy.h.

References Impala::Util::Channel::DATA_BUFFER_SIZE, ILOG_ERROR, ILOG_VAR, Impala::Util::IOBufferChannel::Valid(), and Impala::Util::IOBufferChannel::Write().

Referenced by Impala::Core::Training::Svm::SaveModel(), and Impala::Core::Training::Fisher::SaveModel().

00015 {
00016     ILOG_VAR(Util.FileCopyLocalToRemote);
00017     IOBufferFile local(localFileName, true, false);
00018     if (!local.Valid())
00019     {
00020         ILOG_ERROR("Unable to open local : " << localFileName);
00021         return;
00022     }
00023     IOBufferChannel remote(remoteFileName, false);
00024     if (!remote.Valid())
00025     {
00026         ILOG_ERROR("Unable to open remote : " << remoteFileName);
00027         return;
00028     }
00029     int bufSize = Channel::DATA_BUFFER_SIZE - 100; // leave room for comm info
00030     char* buf = new char[bufSize];
00031     while (local.Available() > 0)
00032     {
00033         int nrRead = local.Read(buf, bufSize);
00034         remote.Write(buf, nrRead);
00035     }
00036     delete buf;
00037 }

Here is the call graph for this function:


Generated on Fri Mar 19 11:39:06 2010 for ImpalaSrc by  doxygen 1.5.1