EllisLab/CodeIgniter — Issue #746: file-helper : get_filenames() returns wrong type of information
Author: jaolstad
Created: 2011-12-07 09:43:23+00:00
State: open

When executing get_filenames($path), based on the information in the documentation, one would expect to have filenames of the files residing in that directory,$path, only.

Unfortunately this is not the case.

When executing get_filenames($path) against a directory with a subdirectory that contains a single file, the following information is returned:

Array (
[0] => file1.png,
[1] => file.2png
)

Where the filestructure in $path is as follows:
file1.png
prints/file2.png

As I see it, the second file should have been returned as prints/file2.png in order to show that it resides under a sub-directory. Or even better, without specifying recursion; the file, file2.png should not have been returned at all!