This article documents the usage of the Cpanel::Fileman::listfiles function in relation to the cPanel interface. This tag can be used inside cPanel pages.
Synopsis
Cpanel::Fileman::listfiles
Description
This function lists all files in a specific directory.
Variables
Input
- dir (string)
- Absolute path to the directory to be listed.
- showdotfiles (string)
- Whether or not to show files that begin with a '.'
- needmime (string)
- Set this to 1 if MIME info result is needed.
- types (string)
- Comma seperated list of file types. If sepecified, will only return files of those types. (file|dir|special)
- filelist (string)
- Comma seperated list of files to list. Format: filelist=filename.ext, file2.ext, file3.ext
Output
Examples
/user/public_html/ ?>
This example will list the name, path to, and size of (in MB) all the files in the directory
/home/user/public_html/.
Copyright
Copyright 2007 cPanel Inc.
Topic revision: r2 - 07 Apr 2009 - 21:27:33 - Main.JustinSchaefer