rmdir

(FW >= 1.0)

rmdir - Removes directory

Description

int rmdir( string $directory [, int $removesubdirs ] )
Attempts to remove the directory named by dirname.

Parameters

directory

Path to the directory

removesubdirs

Passing 0 will fail if the folder is not empty. Passing 1 will force delete everything below the path.
WARNING: Setting this to 1 will cause all subdirectories and files to be removed!

Return Value

Returns 0 on success and -1 on failure.

Examples

<? 
if (rmdir("/mypath/")==0) {
	print("Directory removed!");
}
?>