Project

General

Profile

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

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
	);;