Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADIR and Directories
Message
De
20/05/2009 16:34:46
 
 
À
20/05/2009 02:24:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01400760
Message ID:
01401117
Vues:
78
>>Hmmmmm...thanks to all of you for the feedback.
>>
>>So, a DirectoryIsEmpty() function would be something like this:
>>
>>LPARAMETERS tcDir
>>RETURN ADIR(laTemp, tcDir, "D") < IIF(OCCURS("\", tcDir) = 1, 1, 3)
>>
>>where tcDir ends in "\*.*"
>>
>>Is there a more elegant construct or dedicated function available?
>>
>>-mark
>>
>>=======================
>
>
>Something like
>
>function DirectoryIsEmpty(tcDir)
>
>local aa[1] , n
>n = adir(aa, addbs(m.tcDir) + '*.*', 'DHS')
>
>return  empty(m.n) or ((m.n == 2) and (aa[1,1]=='.') and (aa[2,1] == '..') )
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform