PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Paul Scott   File Manager   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example Script
Class: File Manager
Perform several types of file manipulation
Author: By
Last change:
Date: 18 years ago
Size: 885 bytes


Class file image Download
//include the class src
//instantiate the class
$files = new filemanager;

//do a recursive file search for *.php
$phpfiles = $files->globr('/var/www/html/phpclasses/','*.php',NULL);

//find the parent directory
$parent = $files->parentDir();

//change a files permissions...

//Method to perform a Recursive chmod

//get the octal for a given permission
$octal = $files->chmodnum('--rxwrxw');

//Recursively chown files to a group
$files->recurse_chown_chgrp('/var/www/', $uid, $gid);

//recursively copy a directory and contents to dest
$files->copyr('/var/www/phpclasses', '/var/www/php_backups');

//Determine how much free drive space is available

//or for Windows