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

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

Definition at line 40 of file FileCopy.h.

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

00041 {
00042     ILOG_VAR(Util.FileCopyRemoteToLocal);
00043     IOBufferFile local(localFileName, false, false);
00044     if (!local.Valid())
00045     {
00046         ILOG_ERROR("Unable to open local : " << localFileName);
00047         return;
00048     }
00049     IOBufferChannel remote(remoteFileName, true);
00050     if (!remote.Valid())
00051     {
00052         ILOG_ERROR("Unable to open remote : " << remoteFileName);
00053         return;
00054     }
00055     int bufSize = Channel::DATA_BUFFER_SIZE - 100; // leave room for comm info
00056     char* buf = new char[bufSize];
00057     while (remote.Available() > 0)
00058     {
00059         int nrRead = remote.Read(buf, bufSize);
00060         local.Write(buf, nrRead);
00061     }
00062     delete buf;
00063 }

Here is the call graph for this function:


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