|
@@ 17-23 (lines=7) @@
|
| 14 |
|
} |
| 15 |
|
|
| 16 |
|
function duplicate_file($old_path,$name){ |
| 17 |
|
if(file_exists($old_path)){ |
| 18 |
|
$info=pathinfo($old_path); |
| 19 |
|
$new_path=$info['dirname']."/".$name.".".$info['extension']; |
| 20 |
|
if(file_exists($new_path)) return false; |
| 21 |
|
|
| 22 |
|
return copy($old_path,$new_path); |
| 23 |
|
} |
| 24 |
|
} |
| 25 |
|
|
| 26 |
|
function rename_file($old_path,$name,$transliteration){ |
|
@@ 28-34 (lines=7) @@
|
| 25 |
|
|
| 26 |
|
function rename_file($old_path,$name,$transliteration){ |
| 27 |
|
$name=fix_filename($name,$transliteration); |
| 28 |
|
if(file_exists($old_path)){ |
| 29 |
|
$info=pathinfo($old_path); |
| 30 |
|
$new_path=$info['dirname']."/".$name.".".$info['extension']; |
| 31 |
|
if(file_exists($new_path)) return false; |
| 32 |
|
|
| 33 |
|
return rename($old_path,$new_path); |
| 34 |
|
} |
| 35 |
|
} |
| 36 |
|
|
| 37 |
|
function rename_folder($old_path,$name,$transliteration){ |