deleteDirs() public method

Delete and specified directories.
public deleteDirs ( ) : boolean
return boolean true if delete, false otherwise
Ejemplo n.º 1
0
 * @package ImageManager
 */
require_once 'config.inc.php';
require_once 'ddt.php';
require_once 'Classes/ImageManager.php';
// uncomment for debugging
// _ddtOn();
//default path is /
$relative = '/';
$manager = new ImageManager($IMConfig);
//process any file uploads
$manager->processUploads();
$manager->deleteFiles();
$refreshDir = false;
//process any directory functions
if ($manager->deleteDirs() || $manager->processNewDir()) {
    $refreshDir = true;
}
//check for any sub-directory request
//check that the requested sub-directory exists
//and valid
if (isset($_REQUEST['dir'])) {
    $path = rawurldecode($_REQUEST['dir']);
    if ($manager->validRelativePath($path)) {
        $relative = $path;
    }
}
$manager = new ImageManager($IMConfig);
//get the list of files and directories
$list = $manager->getFiles($relative);
/* ================= OUTPUT/DRAW FUNCTIONS ======================= */
Ejemplo n.º 2
0
require_once 'config.inc.php';
require_once 'ddt.php';
require_once 'Classes/ImageManager.php';
// uncomment for debugging
// _ddtOn();
//default path is /
$relative = '/';
$manager = new ImageManager($IMConfig);
//process any file uploads
$manager->processUploads();
if ($IMConfig['allow_delete']) {
    $manager->deleteFiles();
}
$refreshDir = false;
//process any directory functions
if ($IMConfig['allow_delete'] && $manager->deleteDirs() || $manager->processNewDir()) {
    $refreshDir = true;
}
//check for any sub-directory request
//check that the requested sub-directory exists
//and valid
if (isset($_REQUEST['dir'])) {
    $path = rawurldecode($_REQUEST['dir']);
    if ($manager->validRelativePath($path)) {
        $relative = $path;
    }
}
$manager = new ImageManager($IMConfig);
//get the list of files and directories
$list = $manager->getFiles($relative);
/* ================= OUTPUT/DRAW FUNCTIONS ======================= */