change function cTempFile

change function cTempFile

Postby mauri.menabue » Wed Sep 28, 2011 4:13 pm

Hi to all,

Is possible to change in std mode the function "cTempFile" in this way ?
Code: Select all  Expand view
function cTempFile( cPath, cExtension )        // returns a temporary filename

   local cFileName

   static cOldName

   DEFAULT cPath := "", cExtension := ""
   
   if .not. empty(cExtension)  <----- New
      if ! "." $ cExtension
         cExtension = "." + cExtension
      endif  
   endif  <--- New

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

   cOldName = cFileName

return cFileName
 


Thank
User avatar
mauri.menabue
 
Posts: 155
Joined: Thu Apr 17, 2008 2:38 pm

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Silvio.Falconi and 101 guests