2019独角兽企业重金招聘Python工程师标准>>>
//单位MB
function getDiskFree(Drive: String): Int64;
varFreeBytes: Int64;
TotalBytes: Int64;
begin
if GetDiskFreeSpaceEx(Pchar(Drive),FreeBytes, TotalBytes, nil) then
begin
RESULT := FreeBytes;
end
else
begin
RESULT := 0;
end;
RESULT:=RESULT shr 20;
end;