function GetFreeSize(filePath:String):Int64;
var
FreeBytesAvailableToCaller : TLargeInteger;
FreeSize : TLargeInteger;
TotalSize : TLargeInteger;
Drive : string;
begin
Drive := ExtractFileDrive(filePath);
GetDiskFreeSpaceEx(PChar(Drive),
FreeBytesAvailableToCaller,
Totalsize,
@FreeSize );
Result := FreeSize;
end;
根据文件路径获取剩余磁盘空间
最新推荐文章于 2020-05-07 16:33:41 发布