[eluser]Genki1[/eluser]
The get_filenames() function recursively includes files in the subdirectories, even when the "recursive" parameter is set FALSE:
Code:
$this->load->helper('file');
$aryFilenames = get_filenames('/home/content/html/assets/', TRUE, FALSE);
The following result clearly includes files from the subdirectory "testimonials" which was not specified:
Array
(
[0] => /home/content/html/assets/testimonials/cccs_1.jpg
[1] => /home/content/html/assets/testimonials/chepakho_1.jpg
[2] => /home/content/html/assets/elliott.jpg
[3] => /home/content/html/assets/jgashi.pdf
)
The desired result is to get the files only from the specified directory (unless the recursive flag is set TRUE):
Array
(
[0] => /home/content/html/assets/elliott.jpg
[1] => /home/content/html/assets/jgashi.pdf
)
By the way, the recursive parameter is not mentioned in the User Guide.
I searched the Forums and the Bug Tracker and do not find any mention of this.