View / Download this file.
-----------------------
get_dir_list() FUNCTION
-----------------------
------------
USAGE FORMAT
------------
Where @dir_list is a returned list of files/directories:
@dir_list = &get_dir_list();
@dir_list = &get_dir_list($dir_path);
-----------
DESCRIPTION
-----------
Retreives a list of files/directories from either the current working
directory or a given directory path.
---------
ARGUMENTS
---------
$dir_path
OPTIONAL
The path of the directory from which contents are to be listed. If no
directory path is provided the current working directory is assumed.
-------
RETURNS
-------
A list (array) of the files/directories contained in the given directory.
--------------
USAGE EXAMPLES
--------------
----------------------------------------------------------------------
Example 1: Display the Contents of the Root Directory, Comma Seperated
----------------------------------------------------------------------
UNIX:
<?= join(', ', &get_dir_list('/')) =?>
WINDOWS:
<?= join(', ', &get_dir_list('C:/')) =?>
|