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