11.08.2009, 15:37
Quote:
Originally Posted by ► James_Alex
Clear A File
pawn Код:
|
pawn Код:
fclear( file[] )
{
if ( file[ 0 ] && fexists( file ) )
{
fremove( file );
new File: f = fopen( file, io_write );
if ( f )
{
fclose( f );
return true;
}
}
return false;
}
pawn Код:
if ( fclear( "some_file.txt" ) ) print( "'some_file.txt' was cleared" );
else print( "failed to clear 'some_file.txt'" );