Information générale
Catégorie:
Codage, syntaxe et commandes
The file temp.txt does NOT exist. I thought FOPEN() will create
temp.txt if it doesn't exist (and the directory exists).
I am actually testing for the existance of the directory.
If the directory exists (which it does for now), then
FOPEN should create the file if it doesn't exist (I thought).
If the temp.txt can't be created, I assume the directory
doesn't exist.
I have been using a work around [ON ERROR ? CHR(7)] but don't
like it.
>Does the file temp.txt exist? Otherwise create it with FCREATE('temp.txt')
>/Pierre Unge, Sweden
>>Assuming my code reads,
>> p_path="c:\temp\"
>> path_ok = FOPEN(p_path+'temp.txt',11)
>>
>>path_ok always returns -1 (Can't read or write)
>>
>>The directory does exist.
>>
>>I have tried all the buffer codes,
>>0 Read Only Buffered
>>1 Write-Only Buffered
>>2 Read and Write Buffered
>>10 Read-Only Unbuffered
>>11 Write-Only Unbuffered
>>12 Read and Write Unbuffered
>>
>>
>>Why does it always return -1?
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement