src/Directory.php
public function deleteRecursively() {
		if ($this->exists()) {
			$entries = @\scandir($this->path);

			foreach ($entries as $entry) {
				if ($entry !== '.' && $entry !== '..') {
					$entryPath = $this->path . '/' . $entry;

					if (@\is_dir($entryPath)) {
						$this->deleteRecursively($entryPath);
					}
					else {
						@\unlink($entryPath);
					}
				}
			}

			@\rmdir($this->path);
		}
	}
public function deleteRecursively() {
		if ($this->exists()) {
			$entries = @\scandir($this->path);

			foreach ($entries as $entry) {
				if ($entry !== '.' && $entry !== '..') {
					$entryPath = $this->path . '/' . $entry;

					if (@\is_dir($entryPath)) {
						$this->deleteRecursively($entryPath);
					}
					else {
						@\unlink($entryPath);
					}
				}
			}

			@\rmdir($this->path);
		}
	}
public function deleteRecursively ( ) { if ( $ this -> exists ( ) ) { $ entries = @ \ scandir ( $ this -> path ) ; foreach ( $ entries as $ entry ) { if ( $ entry !== '.' && $ entry !== '..' ) { $ entryPath = $ this -> path . '/' . $ entry ; if ( @ \ is_dir ( $ entryPath ) ) { $ this -> deleteRecursively ( $ entryPath ) ; } else { @ \ unlink ( $ entryPath ) ; } } } @ \ rmdir ( $ this -> path ) ; } }
Attempts to delete the directory including any contents recursively
Attempts to delete the directory including any contents recursively