array System_WinDrives::getDriveList (
void
)
すべてのドライブのパス (例えば A:\
や C:\
) を配列で返します。
API が使用できない場合は、ドライブ一覧を推測して返します。詳細なデータ (ドライブの型や名前など) を取得するには getDrivesInformation() を使用します。
array - 全てのドライブを含む配列
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:\