Manuel Pear

System_WinDrives::getDrivesInformation()

System_WinDrives::getDrivesInformation() -- Gets information about all drives

Synopsis

  1. <?php
  2. require_once 'System/WinDrives.php
  3. ?> 

array System_WinDrives::getDrivesInformation (void)

Description

Returns an array with all pieces of information one can get for the drives.

Valeur retournée

array - Array of little objects. Key is the drive path, the value is an object with the following values: type, name and typetitle.

Exemple

Exemple 63-1. Using myFunction()

  1. <?php
  2. require_once 'System/WinDrives.php';  
  3.  
  4. $swd = new System_WinDrives();  
  5. $arInfo = $swd->getDrivesInformation();  
  6. foreach ($arInfo as $strPath => $objInfo) { 
  7.    echo 'Drive ' . $strPath . "\r\n"; 
  8.    echo '   type: ' . $objInfo->type . '(' . $objInfo->typetitle . ")\r\n"; 
  9.    echo '   name: ' . $objInfo->name . "\r\n";  
  10. }  
  11.  
  12. ?> 

Output:

Drive A:\
    2 (Removable)
    diskette
Drive C:\
    3 Harddisk
    Windisk

Remonter Remonter
L'éditeur javascript - CSS - Gentoo - Tutoriaux PHP - Tutoriels PHP - Bretagne - php - Moto - Kit graphique