From 788b00f7eaad969120079acedc82e8d60b0e2a46 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Fri, 27 Nov 2009 18:00:20 +0000 Subject: non-backwards compatible change to get_dir_file_info() for performance reasons, as well as fixing recursive bug --- user_guide/helpers/file_helper.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'user_guide/helpers/file_helper.html') diff --git a/user_guide/helpers/file_helper.html b/user_guide/helpers/file_helper.html index d4b1f20b4..b3f81be1a 100644 --- a/user_guide/helpers/file_helper.html +++ b/user_guide/helpers/file_helper.html @@ -125,9 +125,10 @@ CodeIgniter uses a front controller so paths are always relative to the main sit

Takes a server path as input and returns an array containing the names of all files contained within it. The file path can optionally be added to the file names by setting the second parameter to TRUE.

-

get_dir_file_info('path/to/directory/')

+

get_dir_file_info('path/to/directory/', $top_level_only = TRUE)

-

Reads the specified directory and builds an array containing the filenames, filesize, dates, and permissions. Any sub-folders contained within the specified path are read as well.

+

Reads the specified directory and builds an array containing the filenames, filesize, dates, and permissions. Sub-folders contained within the specified path are only read if forced + by sending the second parameter, $top_level_only to FALSE, as this can be an intensive operation.

get_file_info('path/to/file', $file_information)

-- cgit v1.2.3-24-g4f1b