Up |
Core - Files system - Temporaries files
These temporaries files are deleted automatically when the applications exits or the Scol object is destroyed.
By alphabetic order
- FileTemp
FileTemp - _FILECloseTemp
fun [FileTemp] I - _FILEOpenTemp
fun [Chn] FileTemp - _FILEReadTemp
fun [FileTemp I] S - _FILESeekTemp
fun [FileTemp I I] I - _FILESignTemp
fun [Filetemp] S - _FILESizeTemp
fun [Filetemp] I - _FILETellTemp
fun [FileTemp] I - _FILEWriteTmp
fun [FileTemp S] I
Example :
typeof ftmp = FileTemp;;
typeof string = S;;
fun main()=
_showconsole;
set ftmp = _FILEOpenTemp _channel;
if (ftmp == nil)
(
_fooS "unable to open a new temporary file";
1
)
else
(
_FILEWriteTmp ftmp "Scol a good language !";
_FILESeekTemp ftmp 5 0;
_FILEWriteTmp ftmp "is";
_FILESeekTemp ftmp 0 0;
set string = _FILEReadTemp ftmp 25;
_fooS strcat "Temp : " string;
_FILECloseTemp ftmp; // it's better to close it when no longer needed
0
);;