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:
01431530
Vues:
60
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform