Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Security Issue
Message
De
11/07/2000 17:27:30
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00390933
Message ID:
00390985
Vues:
6
>>What commands would I use to check access?
>
>Use ADIR(ArrayName, addbs(lcChosen_path) + "myfile.txt")
>
>Then look at the results in array element 5 for the attributes.

Not really sufficient. Best way to do this is to try to FCREATE() a new file and trap any error to determine writability of the directory, and then try to read an existing file with a known location through FOPEN, and trap the error. Read/Write/Create/Delete permissions don't show as file attributes directly in VFP.

An alternative is ADSI; I would not recommend trying to butt heads using just API calls from VFP to do this, since it will mean using some pretty involved structure manipulations.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform