Changeset 2855
- Timestamp:
- 21/01/2011 20:16:13 (16 months ago)
- Location:
- box/trunk/lib/common
- Files:
-
- 1 deleted
- 2 edited
-
TemporaryDirectory.h (deleted)
-
Utils.cpp (modified) (1 diff)
-
Utils.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/lib/common/Utils.cpp
r2727 r2855 336 336 return result.str(); 337 337 } 338 339 std::string BoxGetTemporaryDirectoryName() 340 { 341 #ifdef WIN32 342 // http://msdn.microsoft.com/library/default.asp? 343 // url=/library/en-us/fileio/fs/creating_and_using_a_temporary_file.asp 344 345 DWORD dwRetVal; 346 char lpPathBuffer[1024]; 347 DWORD dwBufSize = sizeof(lpPathBuffer); 348 349 // Get the temp path. 350 dwRetVal = GetTempPath(dwBufSize, // length of the buffer 351 lpPathBuffer); // buffer for path 352 if (dwRetVal > dwBufSize) 353 { 354 THROW_EXCEPTION(CommonException, TempDirPathTooLong) 355 } 356 357 return std::string(lpPathBuffer); 358 #elif defined TEMP_DIRECTORY_NAME 359 return std::string(TEMP_DIRECTORY_NAME); 360 #else 361 #error non-static temporary directory names not supported yet 362 #endif 363 } 364 365 -
box/trunk/lib/common/Utils.h
r2551 r2855 40 40 bool MachineReadable); 41 41 42 std::string BoxGetTemporaryDirectoryName(); 43 42 44 #include "MemLeakFindOff.h" 43 45
Note: See TracChangeset
for help on using the changeset viewer.
