Changeset 56998
- Timestamp:
- 10/24/2023 11:32:42 AM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/class-wp-test-stream.php
r55017 r56998 199 199 * 200 200 * @see streamWrapper::mkdir 201 * 202 * @param string $path Directory which should be created. 203 * @param int $mode The value passed to mkdir(). 204 * @param int $options A bitwise mask of values, such as STREAM_MKDIR_RECURSIVE. 205 * @return bool True on success, false on failure. 201 206 */ 202 207 public function mkdir( $path, $mode, $options ) { 203 208 $this->open( $path ); 209 204 210 $plainfile = rtrim( $this->file, '/' ); 205 211 206 if ( isset( WP_Test_Stream::$data[ $this->bucket ][ $file ] ) ) { 207 return false; 208 } 212 // Check if a file or directory with the same name already exists. 213 if ( isset( WP_Test_Stream::$data[ $this->bucket ][ $plainfile ] ) 214 || isset( WP_Test_Stream::$data[ $this->bucket ][ $plainfile . '/' ] ) 215 ) { 216 return false; 217 } 218 209 219 $dir_ref = & $this->get_directory_ref(); 210 220 $dir_ref = 'DIRECTORY'; 221 211 222 return true; 212 223 }
Note: See TracChangeset
for help on using the changeset viewer.