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

void Impala::Persistency::FileSystem::DoDeleteDir ( String  dir  )  [inline, private]

Definition at line 352 of file FileSystem.h.

References ConcatDir(), ILOG_ERROR, ILOG_INFO, mData, Impala::StringEndsWith(), and Impala::StringReplaceAll().

Referenced by DeleteDir().

00353     {
00354         dir = ConcatDir(*mData.begin(), dir);
00355 #ifdef WIN32
00356         dir = StringReplaceAll(dir, "/", "\\", true);
00357         String cmdLine("if exist " + dir + " rmdir /s/q " + dir);
00358 #else
00359         while (StringEndsWith(dir, "/."))
00360             dir = dir.substr(0, dir.size()-2);
00361         String cmdLine("rm -rf " + dir);
00362 #endif
00363         char sysBuf[2048];
00364         ILOG_INFO("[DoDeleteDir] " << cmdLine);
00365         sprintf(sysBuf, "%s", cmdLine.c_str());
00366         //
00367         int sysRes = system(sysBuf);
00368         if (sysRes != 0)
00369         {
00370             ILOG_ERROR("[DoDeleteDir] System call failed: ["  << sysBuf << "]");
00371         }
00372         //
00373     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:22:52 2011 for ImpalaSrc by  doxygen 1.5.1