J'aimerai savoir si la fonction FileReadToArray() est par défaut en lecture seule? Si non, comment faire pour 'forcer' en lecture seule?
Est-ce qu'en faisant comme ceci, je lis bien en lecture seule mon fichier?
Local $hFileOpen = FileOpen("MonFichier.txt", $FO_READ)
$aArray=FileReadToArray($hFileOpen)
If @error Then
MsgBox($MB_SYSTEMMODAL, "", "There was an error reading the file. @error: " & @error) ; An error occurred reading the current script file.
Else
For $i = 0 To UBound($aArray) - 1
MsgBox($MB_SYSTEMMODAL, "", $aArray[$i])
Next
EndIf
FileClose($hFileOpen)
$aArray=FileReadToArray($hFileOpen)
If @error Then
MsgBox($MB_SYSTEMMODAL, "", "There was an error reading the file. @error: " & @error) ; An error occurred reading the current script file.
Else
For $i = 0 To UBound($aArray) - 1
MsgBox($MB_SYSTEMMODAL, "", $aArray[$i])
Next
EndIf
FileClose($hFileOpen)