Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File()
Message
 
À
29/12/2003 10:38:25
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: File()
Divers
Thread ID:
00862385
Message ID:
00862548
Vues:
12
>However I don't trust File() and use my own IsFile() function :
>
>	Procedure IsFile
>	Lparameters tcPath, tcFile
>	Local arrFiles[1]
>	Local lcFullPath
>	tcPath = Iif(Empty(m.tcPath), Sys(5)+Curdir(),m.tcPath)
>	lcFullPath = Iif( Empty(tcFile), m.tcPath, Addbs(m.tcPath)+m.tcFile )
>	Return ( Adir(arrFiles,m.lcFullPath) = 1 )
>Endproc
>
Cetin


With good reason apparently !
Local cEmployeesFolder , xFile

cEmployeesFolder = Addbs(Addbs(oApp.cEmployeeImagesFolder) + "_" + Transform(employees.Id))
If Not Directory(cEmployeesFolder)
	Md (cEmployeesFolder)
Endif

xFile = cEmployeesFolder + "300x350.jpg"
lFileExists = File(xFile)   && this returns .T. when the file doesnt exist
lFileExists2 = Adir(aMyFile,xFile) > 0  && this returns false when the file doesnt exist
Greg Foote
Software At Work, Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform