System_WinDrives::getDriveList()

System_WinDrives::getDriveList() – すべてのドライブのパスを配列で取得する

Synopsis

require_once 'System/WinDrives.php';

array System_WinDrives::getDriveList ( void )

Description

すべてのドライブのパス (例えば A:\C:\) を配列で返します。

API が使用できない場合は、ドライブ一覧を推測して返します。詳細なデータ (ドライブの型や名前など) を取得するには getDrivesInformation() を使用します。

Return value

array - 全てのドライブを含む配列

Example

myFunction() の使用法

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

$swd = new System_WinDrives();
$arPaths $swd->getDriveList();
foreach (
$arPaths as $strPath) {
    echo 
$strPath "\r\n"// 結果は "A:\" や "C:\" のようになります
}
?>

出力:

    
A:\
C:\