PHP Classes

Pictoru's File Tree: Retrieve list of files and folders recursively

Recommend this page to a friend!
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 1,017 All time: 3,607 This week: 488Up
Version License PHP version Categories
pfiletree-inc-php 1.0Free for non-comm...3.0Files and Folders
Description 

Author

This class can be used to retrieve the list of files and folders of a given directory.

It traverses a given directory recursively and returns an array with information about the files and folders in that directory.

Each directory entry in the array has the last modification and last access time, the path, the parent directory path, the URL if the entry was to be access via the Web under a given domain, the entry type and its permissions.

For files it returns the file name extension and the file size. For directories it returns an array with all entries in that directory.

Picture of Ciprian Voicu
Name: Ciprian Voicu <contact>
Classes: 5 packages by
Country: Romania Romania
Age: 44
All time rank: 82818 in Romania Romania
Week rank: 270 Up4 in Romania Romania Up

Details

Version 2.1 • has been added Delete() function. you can delete a file or directory. it uses unlink & rmdir functions. if the path to delete is a folder and is not empty the function will run recursively and delete all files and directories within. • fixed displaying url. Version 2.0 • the PTree_DOCUMENT and PTree_NAME constants have been deleted • a new PTree_ALLOWED_KEYS constant has been added and contains a string with all the allowed information items for each file/dir • the ListFiles() function has now 4 possible parameters. The 4th one is a string containing the parameters to be exported • a small bug from the previous version of FileURL() function has been removed (the url-path wasn't calculated correctly) • The FileInfo class is now an extension of the PFileTree class. Before was an independent one • in the previous version, all the parameters of the file/dir were displayed from the class. In this version, in case the parameter has no value, will not be displayed • has been added the constructor function which has 2 parameters. The first one is the host fullpath and the second one is optional, containing a folder for the relocated sites, if exists. • new function: Keys() returns an array with all allowed elements taken from the PTree_ALLOWED_KEYS or from the 4th parameter of the ListFiles() function, if exists.

  Files folder image Files  
File Role Description
Plain text file PFileTree.inc.php Class Base class
Accessible without login Plain text file example.php Example Example file
Accessible without login Plain text file readme.txt Doc. update info

 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,017
This week:0
All time:3,607
This week:488Up