System_WinDrives::getDrivesInformation()

System_WinDrives::getDrivesInformation() – すべてのドライブの情報を取得する

Synopsis

require_once 'System/WinDrives.php';

array System_WinDrives::getDrivesInformation ( void )

Description

すべてのドライブから取得できる情報を、配列で返します。

Return value

array - 小さなオブジェクトの配列を返します。 配列のキーがドライブのパス、その値がオブジェクトで、 オブジェクトには typename および typetitle の値が含まれます。

Example

myFunction() の使用法

<?php
require_once 'System/WinDrives.php';

$swd = new System_WinDrives();
$arInfo $swd->getDrivesInformation();
foreach (
$arInfo as $strPath => $objInfo) {
    echo 
'ドライブ ' $strPath "\r\n";
    echo 
'    型: ' $objInfo->type '(' $objInfo->typetitle ")\r\n";
    echo 
'    名前: ' $objInfo->name "\r\n";
}
?>

出力:


ドライブ A:\
    2 (Removable)
    diskette
ドライブ C:\
    3 Harddisk
    Windisk