Projects / ScanDir

ScanDir

The class ScanDir provides a method to retrieve the list of all files and/or subdirectories from the specified path. The scan can: scan files and/or just the subdirectories; get only the filename or the full path+filename; give information on each file (size, dates, permissions, extension, and basename, or only filename and size); and filter the files list on some extensions files only. During a scan, all the unique extensions can be listed in an array. You can calculate the total size of files in the scan, and get a count of the number of files and directories. The class was developed because other similar classes seemed to be too complex for the author's requirements. Before running the scan, the class must be set up to enable/disable options. After the scan completes, you have an associative array with all the files and their information. This class can be use on the command line or in PHP Web pages.

Tags
Licenses
Implementation
Translations
Screenshot

Project Spotlight

OpenStack4j

A Fluent OpenStack client API for Java.

Screenshot

Project Spotlight

TurnKey TWiki Appliance

A TWiki appliance that is easy to use and lightweight.