BP_Document::bp_document_remove_temp_directory( $dir )
Remove all temp directory.
Description
Parameters
- $dir
-
(Required)
Source
File: bp-document/classes/class-bp-document.php
public static function bp_document_remove_temp_directory( $dir ) { if ( is_dir( $dir ) ) { $objects = scandir( $dir ); foreach ( $objects as $object ) { if ( $object != '.' && $object != '..' ) { if ( filetype( $dir . '/' . $object ) == 'dir' ) { self::bp_document_remove_temp_directory( $dir . '/' . $object ); } else { unlink( $dir . '/' . $object ); } } } reset( $objects ); rmdir( $dir ); } }
Changelog
Version | Description |
---|---|
BuddyBoss 1.4.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.