Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check if directory is read-only
Message
 
 
To
26/10/2009 12:04:18
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:
01431528
Views:
77
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!
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform