Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check if directory is read-only
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01431495
Message ID:
01431528
Vues:
78
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform