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

static FILE* Impala::Util::IOBufferFile::Open ( CString  path,
CString  mode 
) [inline, static, private]

Definition at line 300 of file IOBufferFile.h.

References Impala::StringReplaceAll().

Referenced by FileExists(), and IOBufferFile().

00301     {
00302 #ifdef WIN32
00303         if (path.size() >= _MAX_PATH)
00304         {
00305             static const String longPathPrefix = "\\\\?\\"; // See MS help on _MAX_PATH
00306             const String longPathSpec = longPathPrefix + StringReplaceAll(path, "/", "\\");
00307             wchar_t longPathSpecWC[32768+1]; // reserve one position for null term.
00308             for (int i = 0; i < longPathSpec.size(); i++)
00309                 longPathSpecWC[i] = (wchar_t) longPathSpec.at(i);
00310             longPathSpecWC[longPathSpec.size()] = L'\0';
00311             wchar_t modeWC[10];
00312             for (int i = 0; i < mode.size(); i++)
00313                 modeWC[i] = (wchar_t) mode.at(i);
00314             modeWC[mode.size()] = L'\0';
00315             FILE* fp = _wfopen(longPathSpecWC, modeWC);
00316             return fp;
00317         }
00318 #endif
00319         return fopen(path.c_str(), mode.c_str());
00320     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:40:54 2010 for ImpalaSrc by  doxygen 1.5.1