?
本文檔使用 php中文網(wǎng)手冊(cè) 發(fā)布
JScript? | 語(yǔ)言參考 |
向用戶返回指定驅(qū)動(dòng)器或網(wǎng)絡(luò)共享上的可用空間的大小。只讀。
object.FreeSpace
object 應(yīng)為 Drive 對(duì)象。
典型情況中,由 FreeSpace 屬性返回的值和由 AvailableSpace 屬性返回的值是相同的。對(duì)于支持 quotas 的計(jì)算機(jī)系統(tǒng)來(lái)說(shuō)兩者有可能不同。
下面的代碼說(shuō)明了 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 對(duì)象