SplFileInfo::getType

Gets file type

&reftitle.description; public ``string``false```SplFileInfo::getType`

Returns the type of the file referenced.

&reftitle.parameters; &no.function.parameters;
&reftitle.returnvalues;

A `string` representing the type of the entry. May be one of `file`, `link`, `dir`, `block`, `fifo`, `char`, `socket`, or `unknown`, or &false; on failure.

&reftitle.errors;

Throws a `RuntimeException` on error.

&reftitle.examples;

### `SplFileInfo::getType` example

    <?php

    $info = new SplFileInfo(__FILE__);
    echo $info->getType().PHP_EOL;

    $info = new SplFileInfo(dirname(__FILE__));
    echo $info->getType();

    ?>

&example.outputs.similar;

    file
    dir