-- fileutils: not user prefs oriented

function WriteFile(path,buf)
	local f = RageFileUtil.CreateRageFile();
	if f:Open(path, 2) then
		f:Write( tostring(buf) );
		f:destroy();
		return true;
	else
		f:destroy();
		return false;
	end;
end;

function ReadFile(path)
	local f = RageFileUtil.CreateRageFile();
	local ret = "";
	if f:Open(path, 1) then
		ret = tostring( f:Read() );
		f:destroy();
		return ret;
	else
		f:destroy();
		return nil;
	end;
end;