?
This document uses PHP Chinese website manual Release
JScript? | 語言參考 |
向用戶返回指定驅(qū)動器或網(wǎng)絡(luò)共享上的可用空間的大小。只讀。
object.FreeSpace
object 應(yīng)為 Drive 對象。
典型情況中,由 FreeSpace 屬性返回的值和由 AvailableSpace 屬性返回的值是相同的。對于支持 quotas 的計算機系統(tǒng)來說兩者有可能不同。
下面的代碼說明了 FreeSpace 屬性的用法:
function ShowFreeSpace(drvPath) {
???var fso, d, s;
???fso = new ActiveXObject("Scripting.FileSystemObject");
???d = fso.GetDrive(fso.GetDriveName(drvPath));
???s = "Drive " + drvPath.toUpperCase( ) + " - ";
???s += d.VolumeName + "<br>";
???s += "Free Space: " + d.FreeSpace/1024 + " Kbytes";
???return(s);
}
AvailableSpace 屬性 | DriveLetter 屬性 | DriveType 屬性 | FileSystem 屬性 | IsReady 屬性 | Path 屬性 | RootFolder 屬性 | SerialNumber 屬性 | ShareName 屬性 | TotalSize 屬性 | VolumeName 屬性
應(yīng)用于: Drive 對象