src/snac/util/EADParser.php
/**
     * Recursively delete a directory
     *
     * Deletes a directory and it's contents from the filesystem.
     * From https://www.php.net/manual/en/function.rmdir.php
     *
     * @param $dir The temporary directory to delete
     */
Recursively delete a directory
Deletes a directory and it's contents from the filesystem.

@param $dir The temporary directory to delete
Recursively delete a directory Deletes a directory and it ' s contents from the filesystem . @param $dir The temporary directory to delete
private function delTree($dir) {
        $files = array_diff(scandir($dir), array('.','..'));
        foreach ($files as $file) {
            (is_dir("$dir/$file")) ? $this->delTree("$dir/$file") : unlink("$dir/$file");
        }
        return rmdir($dir);
    }
private function delTree ( $ dir ) { $ files = array_diff ( scandir ( $ dir ) , array ( '.' , '..' ) ) ; foreach ( $ files as $ file ) { ( is_dir ( " $ dir / $ file " ) ) ? $ this -> delTree ( " $ dir / $ file " ) : unlink ( " $ dir / $ file " ) ; } return rmdir ( $ dir ) ; }
Recursively delete a directory
 Deletes a directory and it's contents from the filesystem.
Recursively delete a directory Deletes a directory and it ' s contents from the filesystem .