System:File:dirList

From Aspen Documentation

List files found in a directory

Since 1.0

Contents

Arguments

array dirList (string $directory)

directory
File system directory to scan.

Returns

Returns an array.

Notes

  • As noted in bug 1244 this function does not currently recurse through child directories.

Examples

Running the function on the root application path:

$this->APP->file->dirList(APPLICATION_PATH);

Returns:

Array
(
    [0] => admin
    [1] => app.default.config.php
    [2] => system
    [3] => config.sample.php
    [4] => errors.php
    [5] => modules
    [6] => index.php
    [7] => tests
    [8] => config.php
)