Title : SaveString - saves a string value as a file
Author : Zethrax
Posted : 1+ years ago
Description : Saves the specified string value as a file.
Can be used in combination with the 'GetInternetFile' function linked below to download and save a file.
GetInternetFile - downloads a file as a string
<a href="codearcsac1f.html?code=3069" target="_blank">http://www.blitzbasic.com/codearcs/codearcs.php?code=3069[/url] Code : Function SaveString( filepath$, stringval$ )
; Saves the 'stringval$' to the specified 'filepath$' as a file.
; Returns True on success or False if there was an error.
Local file, i, l = Len( stringval$ )
file = WriteFile( filepath$ )
If file = 0 Then Return False
For i = 1 To l
WriteByte file, Asc( Mid( stringval$, i, 1 ) )
Next
CloseFile file
Return True
End Function
Comments : none...