function CheckAvaildPhys(tabSize)
	if tabSize == nil then
		return nil
	end
	--XLMessageBox("CheckAvaildPhys")
	local Obj = XLGetObject("Xunlei.OSShell.Obj")
--	local bret = Obj:Ping("xunlei.com")
	--Obj:CheckSocketConnect("xunl22ei.com", "80")
	
	local avaliphys = Obj:GetAvailPhys()
	local result = 0
	if avaliphys > tonumber(tabSize['rule@']['size']) then
		result = 0
	else
		result = 1
	end
	return result
end

function CheckDiskFreeSpace(tabSize)	
	if tabSize == nil then
		return nil
	end
	local Obj = XLGetObject("Xunlei.OSShell.Obj")	
	local freespace = Obj:GetDiskFreeSpace()
	if freespace > tonumber(tabSize['rule@']['size']) then
		--XLMessageBox("0")
		return 0
	else
		--XLMessageBox("1")
		return 1
	end
end

function CleanDisk(tabSize)
    if tabSize == nil then
        return nil
    end	
    local Obj = XLGetObject("Xunlei.OSShell.Obj")		
    Obj:CleanDisk()
    return 1
end
