Much faster cTempFile() function

Much faster cTempFile() function

Postby Antonio Linares » Sat Apr 08, 2006 8:38 pm

FWH April users may change this function to get much faster printing previews:
Code: Select all  Expand view  RUN
function cTempFile( cPath, cExtension )        // returns a temporary filename

   local cFileName

   static cOldName

   DEFAULT cPath := "", cExtension := ""
   
   if ! "." $ cExtension
      cExtension = "." + cExtension
   endif   

   while File( cFileName := ( cPath + LTrim( Str( GetTickCount() ) ) + cExtension ) ) .or. ;
         cFileName == cOldName
   end

   cOldName = cFileName

return cFileName
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Return to Bugs report & fixes / Informe de errores y arreglos

Who is online

Users browsing this forum: No registered users and 5 guests