diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 61f0d30..139dbf7 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -596,8 +596,6 @@
 		return $str;
 	}
 
-
-
 	// --------------------------------------------------------------------
 
 	/**
diff --git a/system/helpers/directory_helper.php b/system/helpers/directory_helper.php
index e6ed47f..ad86851 100644
--- a/system/helpers/directory_helper.php
+++ b/system/helpers/directory_helper.php
@@ -40,12 +40,10 @@
  * @return	array
  */	
 function directory_map($source_dir, $top_level_only = FALSE)
-{
-	if ( ! isset($filedata))
-		$filedata = array();
-	
+{	
 	if ($fp = @opendir($source_dir))
 	{
+		$filedata = array();
 		while (FALSE !== ($file = readdir($fp)))
 		{
 			if (@is_dir($source_dir.$file) && substr($file, 0, 1) != '.' AND $top_level_only == FALSE)
diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php
index c9c2138..4da62ad 100644
--- a/system/helpers/file_helper.php
+++ b/system/helpers/file_helper.php
@@ -141,5 +141,39 @@
 	}
 }
 
+// ------------------------------------------------------------------------
+
+/**
+ * Get Filenames
+ *
+ * Reads the specified directory and builds an array containing the filenames.  
+ * Any sub-folders contained within the specified path are read as well.
+ *
+ * @access	public
+ * @param	string	path to source
+ * @param	bool	whether to include the path as part of the filename
+ * @return	array
+ */	
+function get_filenames($source_dir, $include_path = FALSE)
+{
+	static $_filedata = array();
+	
+	if ($fp = @opendir($source_dir))
+	{
+		while (FALSE !== ($file = readdir($fp)))
+		{
+			if (@is_dir($source_dir.$file) && substr($file, 0, 1) != '.')
+			{
+				 get_filenames($source_dir.$file."/", $include_path);
+			}
+			elseif (substr($file, 0, 1) != ".")
+			{
+			
+				$_filedata[] = ($include_path == TRUE) ? $source_dir.$file : $file;
+			}
+		}
+		return $_filedata;
+	}
+}
 
 ?>
\ No newline at end of file