Scripting Runtime Library(FileSystemObject)

ÁöÁ¤ÇÑ µå¶óÀ̺갡 ÁغñµÇ¸é true¸¦, ¾Æ´Ï¸é false¸¦ ¹ÝȯÇÑ´Ù.

Àμö
object : (°³Ã¼)

object´Â Ç×»ó Drive °³Ã¼ÀÌ´Ù.

: (¼Ó¼º ºÎ¿ï°ª)
¼Ó¼º°ªÀº ÁöÁ¤ÇÑ µå¶óÀ̺갡 ÁغñµÇ¾î Àִ°¡¸¦ ³ªÅ¸³»´Â ºÎ¿ï°ªÀÌ´Ù.

true ÁöÁ¤ÇÑ µå¶óÀ̺갡 ÁغñµÇ¾î ÀÖ´Ù.
false ÁöÁ¤ÇÑ µå¶óÀ̺갡 ÁغñµÇ¾î ÀÖÁö ¾Ê´Ù.

ÀÌ ¼Ó¼ºÀº ÀбâÀü¿ëÀÌ¸ç µðÆúÆ®°ªÀº falseÀÌ´Ù.

Ư±â

À̵¿½Ä ¸Åü µå¶óÀ̺ê¿Í CD-ROM µå¶óÀ̺êÀÇ °æ¿ì¿¡´Â ÀûÇÕÇÑ ¸Åü°¡ »ðÀÔµÇ°í ¾×¼¼½º Áغñ°¡ ³¡³­ °æ¿ì¿¡¸¸ IsReady°¡ true¸¦ ¹ÝȯÇÑ´Ù.


IsReady ¼Ó¼º ¿¹Á¦

°á°ú Ç¥½Ãâ
JScript IsReady ¼Ó¼º ¿¹Á¦
<SCRIPT language=JScript>
function IsReadyTest(){
  var fso,driveObj,str='';
  fso=new ActiveXObject('Scripting.FileSystemObject');
  enumObj=new Enumerator(fso.Drives);
  for (; !enumObj.atEnd(); enumObj.moveNext()){
    driveObj=enumObj.item();
    str+='µå¶óÀ̺ê '+driveObj.DriveLetter+': - ';
    if (driveObj.IsReady) str+=driveObj.FreeSpace+' byte<BR>';
    else str+='Áغñ ¾ÈµÊ<BR>';
  }
  return(str);
}
</SCRIPT>

<DIV id=showjs class=show alt="°á°ú">°á°ú Ç¥½Ãâ</DIV>
<DIV class=show onClick="showjs.innerHTML=IsReadyTest()">
  <SPAN class=ie>JScript</SPAN> <SPAN class=property>IsReady</SPAN> ¼Ó¼º ¿¹Á¦</DIV>

VBScript·Î ¹Ýº¹

°á°ú Ç¥½Ãâ
VBScript IsReady ¼Ó¼º ¿¹Á¦
<SCRIPT language=VBScript>
Function IsReadyTestvb()
  Dim fso,driveObj
  str=""
  Set fso=CreateObject("Scripting.FileSystemObject")
  Set drivesCol=fso.Drives
  For Each driveObj in drivesCol
    str=str&"µå¶óÀ̺ê "&driveObj.DriveLetter&": - "
    If driveObj.IsReady Then
      str=str&driveObj.FreeSpace&" byte<BR>"
    Else str=str&"Áغñ ¾ÈµÊ<BR>"
    End If
  Next
  IsReadyTestvb=str
End Function
</SCRIPT>

<DIV id=showvb class=show alt="°á°ú">°á°ú Ç¥½Ãâ</DIV>
<DIV class=show onClick="showvb.innerHTML=IsReadyTestvb()">
  <SPAN class=ie>VBScript</SPAN> <SPAN class=property>IsReady</SPAN> ¼Ó¼º ¿¹Á¦</DIV>