/**
 * Delete a directory.
 *
 * @param  string $directory Directory to delete.
 * @param  bool   $preserve  The directory itself may be optionally preserved.
 *
 * @return bool Returns TRUE on success or FALSE on failure.
 */
public function delete(bool $preserve = false): bool

Examples

$filesystem->directory('/foo')->delete();

Getting Started

Methods

Filesystem
File
Directory