CI_FTP::delete_dir()

delete_dir($filepath)

Parameters:
  • $filepath (string) – Path to directory to delete
Returns:

TRUE on success, FALSE on failure

Return type:

bool

Lets you delete a directory and everything it contains. Supply the source path to the directory with a trailing slash.

Important

Be VERY careful with this method! It will recursively delete everything within the supplied path, including sub-folders and all files. Make absolutely sure your path is correct. Try using list_files() first to verify that your path is correct.

$this->ftp->delete_dir('/public_html/path/to/folder/');
doc_CodeIgniter
2016-10-15 16:31:35
Comments
Leave a Comment

Please login to continue.