Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Security Issue
Message
From
11/07/2000 17:27:30
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00390933
Message ID:
00390985
Views:
7
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform