Changeset 13001 for trunk/wp-admin/includes/class-wp-filesystem-direct.php
- Timestamp:
- 02/07/2010 02:15:27 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-filesystem-direct.php
r12998 r13001 197 197 if ( ! $overwrite && $this->exists($destination) ) 198 198 return false; 199 199 200 return copy($source, $destination); 200 201 } 201 202 202 203 function move($source, $destination, $overwrite = false) { 203 //Possible to use rename()? 204 if ( ! $overwrite && $this->exists($destination) ) 205 return false; 206 207 // try using rename first. if that fails (for example, source is read only) try copy 208 if ( @rename($source, $destination) ) 209 return true; 210 204 211 if ( $this->copy($source, $destination, $overwrite) && $this->exists($destination) ) { 205 212 $this->delete($source);
Note: See TracChangeset
for help on using the changeset viewer.