📜  ASP IsReady 属性

📅  最后修改于: 2022-05-13 01:56:50.442000             🧑  作者: Mango

ASP IsReady 属性

ASP IsReady 属性用于返回一个布尔值,该值指定驱动器是否就绪。如果指定的驱动器准备就绪,则返回true ,否则返回false

句法:

DriveObject.IsReady

示例:下面的代码演示了 ASP Drive.IsReady 属性。

ASP
<%
dim fs,d,n
set fs=Server.CreateObject("Scripting.FileSystemObject")
    
'Get the drive to be checked
set d=fs.GetDrive("c:")
  
n = "Drive " & d.DriveLetter & " is ready: "
  
'Check if the drive is ready
if d.IsReady=true then
  n=n & "true"
else
  n=n & "false"
end if
  
'Write out the response
Response.Write(n)
  
set d=nothing
set fs=nothing
%>


输出:

Drive C is ready: true