Location: PHPKode > scripts > File Manager > file-manager/example.php
<?php
//include the class src
include('filemanager_class_inc.php');
//instantiate the class
$files = new filemanager;

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

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

//change a files permissions...
$files->changeMode('/var/www/html/test.php',0777);

//Method to perform a Recursive chmod
$files->chmod_R('/var/www/',0777);

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

//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
$files->df('/');

//or for Windows
$files->df("C:");
?>
Return current item: File Manager