Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check if directory is read-only
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01431495
Message ID:
01431530
Views:
58
Yes it is :-)
But the first thing that came to my mind was FCREATE() :-)

>Wouldn't be simpler to use STRTOFILE() (not tested either)?
>
>llRedaOnly = (STRTOFILE("Delete me!",  lcFile) == 0)
>IF NOT llRedaOnly
>     ERASE (lcFile)
>ENDIF
>
>
>
>>Try to create file there:
>>
>>IsFolderReadOnly("c:\Test")
>>
>>
>>
>>FUNCTION IsFolderReadOnly(lcFolder)
>>  LOCAL lnHandle, lcFile, lbRetVal
>>  lcFile   = ADDBS(m.lcFolder) + SYS(2015)+".TST"
>>  lnHandle = FCREATE(m.lcFile)
>>  IF m.lnHandle < 0
>>     lbRetVal = .t.
>>  ELSE
>>     FCLOSE(m.lnHandle)
>>     ERASE (m.lcFile)
>>  ENDIF
>>
>>RETURN m.lbRetVal
>>
>>NOT TESTED!
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform