PEAR Manual
Prev |  | Next

# System_WinDrives::getDriveName()

System_WinDrives::getDriveName() -- Returns the user-defined name for a drive

## Synopsis

    require_once 'System/WinDrives.php';

``string System_WinDrives::getDriveName` (string $strDrive)`

## Description

Returns the user-given name for the given drive. The function does not work on PHP5 and returns an empty string `''`.

## Parameter

string `$strDrive`

  The drive path, whose name shall be read.

## Return value

string - The drive label

## Example

Example 56-1. Using myFunction()
    <?php
    require_once 'System/WinDrives.php';

    $swd = new System_WinDrives();
    echo $swd->getDriveName('C:\\');
    ?>
Output:
    Windrive

Prev | Home | Next
System_WinDrives::getDriveList() | Up | System_WinDrives::getDrivesInformation()