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


require_once 'System/WinDrives.php';

array System_WinDrives::getDrivesInformation ( void )


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

Return value

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


Using myFunction()

require_once 'System/WinDrives.php';

$swd = new System_WinDrives();
$arInfo $swd->getDrivesInformation();
foreach (
$arInfo as $strPath => $objInfo) {
'Drive ' $strPath "\r\n";
'    type: ' $objInfo->type '(' $objInfo->typetitle ")\r\n";
'    name: ' $objInfo->name "\r\n";


Drive A:\
    2 (Removable)
Drive C:\
    3 Harddisk
Returns the user-defined name for a drive (Previous) Gets the type of a drive (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.