Skip to content
This repository
Browse code

allow Folder to merge recursivly and add scheme option

  • Loading branch information...
commit 37068539bdddbe2558d0aa597b30eaa0e24378d4 1 parent 99b798f
Mark authored September 10, 2012
302  lib/Cake/Test/Case/Utility/FolderTest.php
@@ -29,11 +29,16 @@ class FolderTest extends CakeTestCase {
29 29
 	protected static $_tmp = array();
30 30
 
31 31
 /**
32  
- * Save the directory names in TMP
  32
+ * Save the directory names in TMP and make sure default directories exist
33 33
  *
34 34
  * @return void
35 35
  */
36 36
 	public static function setUpBeforeClass() {
  37
+		$dirs = array('cache', 'logs', 'sessions', 'tests');
  38
+		foreach ($dirs as $dir) {
  39
+			new Folder(TMP . $dir, true);
  40
+		}
  41
+
37 42
 		foreach (scandir(TMP) as $file) {
38 43
 			if (is_dir(TMP . $file) && !in_array($file, array('.', '..'))) {
39 44
 				self::$_tmp[] = $file;
@@ -803,6 +808,62 @@ public function testDelete() {
803 808
 /**
804 809
  * testCopy method
805 810
  *
  811
+ * Verify that subdirectories existing in both destination and source directory
  812
+ * are merged recursivly.
  813
+ *
  814
+ */
  815
+	public function testCopy() {
  816
+		extract($this->_setupFilesystem());
  817
+
  818
+		$Folder = new Folder($folderOne);
  819
+		$result = $Folder->copy($folderThree);
  820
+		$this->assertTrue($result);
  821
+		$this->assertTrue(file_exists($folderThree . DS . 'file1.php'));
  822
+		$this->assertTrue(file_exists($folderThree . DS . 'folderA' . DS . 'fileA.php'));
  823
+
  824
+		$Folder = new Folder($folderTwo);
  825
+		$result = $Folder->copy($folderThree);
  826
+		$this->assertTrue($result);
  827
+		$this->assertTrue(file_exists($folderThree . DS . 'file1.php'));
  828
+		$this->assertTrue(file_exists($folderThree . DS . 'file2.php'));
  829
+		$this->assertTrue(file_exists($folderThree . DS . 'folderA' . DS . 'fileA.php'));
  830
+		$this->assertTrue(file_exists($folderThree . DS . 'folderB' . DS . 'fileB.php'));
  831
+
  832
+		$Folder = new Folder($path);
  833
+		$Folder->delete();
  834
+	}
  835
+
  836
+/**
  837
+ * testCopyWithMerge method
  838
+ *
  839
+ * Verify that subdirectories existing in both destination and source directory
  840
+ * are merged recursivly.
  841
+ *
  842
+ */
  843
+	public function testCopyWithMerge() {
  844
+		extract($this->_setupFilesystem());
  845
+
  846
+		$Folder = new Folder($folderOne);
  847
+		$result = $Folder->copy($folderThree);
  848
+		$this->assertTrue($result);
  849
+		$this->assertTrue(file_exists($folderThree . DS . 'file1.php'));
  850
+		$this->assertTrue(file_exists($folderThree . DS . 'folderA' . DS . 'fileA.php'));
  851
+
  852
+		$Folder = new Folder($folderTwo);
  853
+		$result = $Folder->copy(array('to' => $folderThree, 'scheme' => Folder::MERGE));
  854
+		$this->assertTrue($result);
  855
+		$this->assertTrue(file_exists($folderThree . DS . 'file1.php'));
  856
+		$this->assertTrue(file_exists($folderThree . DS . 'file2.php'));
  857
+		$this->assertTrue(file_exists($folderThree . DS . 'folderA' . DS . 'fileA.php'));
  858
+		$this->assertTrue(file_exists($folderThree . DS . 'folderB' . DS . 'fileB.php'));
  859
+
  860
+		$Folder = new Folder($path);
  861
+		$Folder->delete();
  862
+	}
  863
+
  864
+/**
  865
+ * testCopyWithSkip method
  866
+ *
806 867
  * Verify that directories and files are copied recursively
807 868
  * even if the destination directory already exists.
808 869
  * Subdirectories existing in both destination and source directory
@@ -810,55 +871,195 @@ public function testDelete() {
810 871
  *
811 872
  * @return void
812 873
  */
813  
-	public function testCopy() {
  874
+	public function testCopyWithSkip() {
  875
+		extract($this->_setupFilesystem());
  876
+
  877
+		$Folder = new Folder($folderOne);
  878
+		$result = $Folder->copy(array('to' => $folderTwo, 'scheme' => Folder::SKIP));
  879
+		$this->assertTrue($result);
  880
+		$this->assertTrue(file_exists($folderTwo . DS . 'file1.php'));
  881
+		$this->assertTrue(file_exists($folderTwo . DS . 'folderA' . DS . 'fileA.php'));
  882
+
  883
+		$Folder = new Folder($folderTwo);
  884
+		$Folder->delete();
  885
+
  886
+		$Folder = new Folder($folderOne);
  887
+		$result = $Folder->copy(array('to' => $folderTwo, 'scheme' => Folder::SKIP));
  888
+		$this->assertTrue($result);
  889
+		$this->assertTrue(file_exists($folderTwo . DS . 'file1.php'));
  890
+		$this->assertTrue(file_exists($folderTwo . DS . 'folderA' . DS . 'fileA.php'));
  891
+
  892
+		$Folder = new Folder($folderTwo);
  893
+		$Folder->delete();
  894
+
  895
+		new Folder($folderTwo, true);
  896
+		new Folder($folderTwo . DS . 'folderB', true);
  897
+		file_put_contents($folderTwo . DS . 'file2.php', 'touched');
  898
+		file_put_contents($folderTwo . DS . 'folderB' . DS . 'fileB.php', 'untouched');
  899
+
  900
+		$Folder = new Folder($folderTwo);
  901
+		$result = $Folder->copy(array('to' => $folderThree, 'scheme' => Folder::SKIP));
  902
+		$this->assertTrue($result);
  903
+		$this->assertTrue(file_exists($folderThree . DS . 'file2.php'));
  904
+		$this->assertEquals('touched', file_get_contents($folderThree . DS . 'file2.php'));
  905
+		$this->assertEquals('untouched', file_get_contents($folderThree . DS . 'folderB' . DS . 'fileB.php'));
  906
+
  907
+		$Folder = new Folder($path);
  908
+		$Folder->delete();
  909
+	}
  910
+
  911
+/**
  912
+ * testCopyWithOverwrite
  913
+ *
  914
+ * Verify that subdirectories existing in both destination and source directory
  915
+ * are overwritten/replaced recursivly.
  916
+ *
  917
+ * $path: folder_test/
  918
+ * $folderOne: folder_test/folder1/
  919
+ * - file1.php
  920
+ * $folderTwo: folder_test/folder2/
  921
+ * - file2.php
  922
+ * $folderThree: folder_test/folder1/folder3/
  923
+ * - file3.php
  924
+ * $folderFour: folder_test/folder2/folder4/
  925
+ * - file4.php
  926
+ * $folderThree: folder_test/folder5/
  927
+ */
  928
+	function testCopyWithOverwrite() {
  929
+		extract($this->_setupFilesystem());
  930
+
  931
+		$Folder = new Folder($folderOne);
  932
+		$result = $Folder->copy(array('to' => $folderThree, 'scheme' => Folder::OVERWRITE));
  933
+
  934
+		$this->assertTrue(file_exists($folderThree . DS . 'file1.php'));
  935
+		$this->assertTrue(file_exists($folderThree . DS . 'folderA' . DS . 'fileA.php'));
  936
+
  937
+		$Folder = new Folder($folderTwo);
  938
+		$result = $Folder->copy(array('to' => $folderThree, 'scheme' => Folder::OVERWRITE));
  939
+		$this->assertTrue($result);
  940
+
  941
+		$this->assertTrue(file_exists($folderThree . DS . 'folderA' . DS . 'fileA.php'));
  942
+
  943
+		$Folder = new Folder($folderOne);
  944
+		unlink($fileOneA);
  945
+		$result = $Folder->copy(array('to' => $folderThree, 'scheme' => Folder::OVERWRITE));
  946
+		$this->assertTrue($result);
  947
+
  948
+		$this->assertTrue(file_exists($folderThree . DS . 'file1.php'));
  949
+		$this->assertTrue(file_exists($folderThree . DS . 'file2.php'));
  950
+		$this->assertTrue(!file_exists($folderThree . DS . 'folderA' . DS . 'fileA.php'));
  951
+		$this->assertTrue(file_exists($folderThree . DS . 'folderB' . DS . 'fileB.php'));
  952
+
  953
+		$Folder = new Folder($path);
  954
+		$Folder->delete();
  955
+	}
  956
+
  957
+/**
  958
+ * Setup filesystem for copy tests
  959
+ *
  960
+ * @return void
  961
+ */
  962
+	protected function _setupFilesystem() {
814 963
 		$path = TMP . 'folder_test';
  964
+
815 965
 		$folderOne = $path . DS . 'folder1';
816  
-		$folderTwo = $folderOne . DS . 'folder2';
  966
+		$folderOneA = $folderOne . DS . 'folderA';
  967
+		$folderTwo = $path . DS . 'folder2';
  968
+		$folderTwoB = $folderTwo . DS . 'folderB';
817 969
 		$folderThree = $path . DS . 'folder3';
  970
+
818 971
 		$fileOne = $folderOne . DS . 'file1.php';
819 972
 		$fileTwo = $folderTwo . DS . 'file2.php';
  973
+		$fileOneA = $folderOneA . DS . 'fileA.php';
  974
+		$fileTwoB = $folderTwoB . DS . 'fileB.php';
820 975
 
821 976
 		new Folder($path, true);
822 977
 		new Folder($folderOne, true);
  978
+		new Folder($folderOneA, true);
823 979
 		new Folder($folderTwo, true);
  980
+		new Folder($folderTwoB, true);
824 981
 		new Folder($folderThree, true);
825 982
 		touch($fileOne);
826 983
 		touch($fileTwo);
  984
+		touch($fileOneA);
  985
+		touch($fileTwoB);
  986
+
  987
+		return compact(
  988
+			'path',
  989
+			'folderOne', 'folderOneA', 'folderTwo', 'folderTwoB', 'folderThree',
  990
+			'fileOne', 'fileOneA', 'fileTwo', 'fileTwoB');
  991
+	}
  992
+
  993
+/**
  994
+ * testMove method
  995
+ *
  996
+ * Verify that directories and files are moved recursively
  997
+ * even if the destination directory already exists.
  998
+ * Subdirectories existing in both destination and source directory
  999
+ * are merged recursivly.
  1000
+ *
  1001
+ * @return void
  1002
+ */
  1003
+	public function testMove() {
  1004
+		extract($this->_setupFilesystem());
827 1005
 
828 1006
 		$Folder = new Folder($folderOne);
829  
-		$result = $Folder->copy($folderThree);
  1007
+		$result = $Folder->move($folderTwo);
830 1008
 		$this->assertTrue($result);
831  
-		$this->assertTrue(file_exists($folderThree . DS . 'file1.php'));
832  
-		$this->assertTrue(file_exists($folderThree . DS . 'folder2' . DS . 'file2.php'));
  1009
+		$this->assertTrue(file_exists($folderTwo . DS . 'file1.php'));
  1010
+		$this->assertTrue(is_dir($folderTwo . DS . 'folderB'));
  1011
+		$this->assertTrue(file_exists($folderTwo . DS . 'folderB' . DS . 'fileB.php'));
  1012
+		$this->assertFalse(file_exists($fileOne));
  1013
+		$this->assertTrue(file_exists($folderTwo . DS . 'folderA'));
  1014
+		$this->assertFalse(file_exists($folderOneA));
  1015
+		$this->assertFalse(file_exists($fileOneA));
833 1016
 
834  
-		$Folder = new Folder($folderThree);
  1017
+		$Folder = new Folder($folderTwo);
835 1018
 		$Folder->delete();
836 1019
 
  1020
+		new Folder($folderOne, true);
  1021
+		new Folder($folderOneA, true);
  1022
+		touch($fileOne);
  1023
+		touch($fileOneA);
  1024
+
837 1025
 		$Folder = new Folder($folderOne);
838  
-		$result = $Folder->copy($folderThree);
  1026
+		$result = $Folder->move($folderTwo);
839 1027
 		$this->assertTrue($result);
840  
-		$this->assertTrue(file_exists($folderThree . DS . 'file1.php'));
841  
-		$this->assertTrue(file_exists($folderThree . DS . 'folder2' . DS . 'file2.php'));
  1028
+		$this->assertTrue(file_exists($folderTwo . DS . 'file1.php'));
  1029
+		$this->assertTrue(is_dir($folderTwo . DS . 'folderA'));
  1030
+		$this->assertTrue(file_exists($folderTwo . DS . 'folderA' . DS . 'fileA.php'));
  1031
+		$this->assertFalse(file_exists($fileOne));
  1032
+		$this->assertFalse(file_exists($folderOneA));
  1033
+		$this->assertFalse(file_exists($fileOneA));
842 1034
 
843  
-		$Folder = new Folder($folderThree);
  1035
+		$Folder = new Folder($folderTwo);
844 1036
 		$Folder->delete();
845 1037
 
846  
-		new Folder($folderThree, true);
847  
-		new Folder($folderThree . DS . 'folder2', true);
848  
-		file_put_contents($folderThree . DS . 'folder2' . DS . 'file2.php', 'untouched');
  1038
+		new Folder($folderOne, true);
  1039
+		new Folder($folderOneA, true);
  1040
+		new Folder($folderTwo, true);
  1041
+		new Folder($folderTwoB, true);
  1042
+		touch($fileOne);
  1043
+		touch($fileOneA);
  1044
+		new Folder($folderOne . DS . 'folderB', true);
  1045
+		touch($folderOne . DS . 'folderB' . DS . 'fileB.php');
  1046
+		file_put_contents($folderTwoB . DS . 'fileB.php', 'untouched');
849 1047
 
850 1048
 		$Folder = new Folder($folderOne);
851  
-		$result = $Folder->copy($folderThree);
  1049
+		$result = $Folder->move($folderTwo);
852 1050
 		$this->assertTrue($result);
853  
-		$this->assertTrue(file_exists($folderThree . DS . 'file1.php'));
854  
-		$this->assertEquals('untouched', file_get_contents($folderThree . DS . 'folder2' . DS . 'file2.php'));
  1051
+		$this->assertTrue(file_exists($folderTwo . DS . 'file1.php'));
  1052
+		$this->assertEquals('', file_get_contents($folderTwoB . DS . 'fileB.php'));
  1053
+		$this->assertFalse(file_exists($fileOne));
  1054
+  	$this->assertFalse(file_exists($folderOneA));
  1055
+		$this->assertFalse(file_exists($fileOneA));
855 1056
 
856 1057
 		$Folder = new Folder($path);
857 1058
 		$Folder->delete();
858 1059
 	}
859 1060
 
860 1061
 /**
861  
- * testMove method
  1062
+ * testMoveWithSkip method
862 1063
  *
863 1064
  * Verify that directories and files are moved recursively
864 1065
  * even if the destination directory already exists.
@@ -867,68 +1068,57 @@ public function testCopy() {
867 1068
  *
868 1069
  * @return void
869 1070
  */
870  
-	public function testMove() {
871  
-		$path = TMP . 'folder_test';
872  
-		$folderOne = $path . DS . 'folder1';
873  
-		$folderTwo = $folderOne . DS . 'folder2';
874  
-		$folderThree = $path . DS . 'folder3';
875  
-		$fileOne = $folderOne . DS . 'file1.php';
876  
-		$fileTwo = $folderTwo . DS . 'file2.php';
877  
-
878  
-		new Folder($path, true);
879  
-		new Folder($folderOne, true);
880  
-		new Folder($folderTwo, true);
881  
-		new Folder($folderThree, true);
882  
-		touch($fileOne);
883  
-		touch($fileTwo);
  1071
+	public function testMoveWithSkip() {
  1072
+		extract($this->_setupFilesystem());
884 1073
 
885 1074
 		$Folder = new Folder($folderOne);
886  
-		$result = $Folder->move($folderThree);
  1075
+		$result = $Folder->move(array('to' => $folderTwo, 'scheme' => Folder::SKIP));
887 1076
 		$this->assertTrue($result);
888  
-		$this->assertTrue(file_exists($folderThree . DS . 'file1.php'));
889  
-		$this->assertTrue(is_dir($folderThree . DS . 'folder2'));
890  
-		$this->assertTrue(file_exists($folderThree . DS . 'folder2' . DS . 'file2.php'));
  1077
+		$this->assertTrue(file_exists($folderTwo . DS . 'file1.php'));
  1078
+		$this->assertTrue(is_dir($folderTwo . DS . 'folderB'));
  1079
+		$this->assertTrue(file_exists($folderTwoB . DS . 'fileB.php'));
891 1080
 		$this->assertFalse(file_exists($fileOne));
892  
-		$this->assertFalse(file_exists($folderTwo));
893  
-		$this->assertFalse(file_exists($fileTwo));
  1081
+		$this->assertFalse(file_exists($folderOneA));
  1082
+		$this->assertFalse(file_exists($fileOneA));
894 1083
 
895  
-		$Folder = new Folder($folderThree);
  1084
+		$Folder = new Folder($folderTwo);
896 1085
 		$Folder->delete();
897 1086
 
898 1087
 		new Folder($folderOne, true);
  1088
+		new Folder($folderOneA, true);
899 1089
 		new Folder($folderTwo, true);
900 1090
 		touch($fileOne);
901  
-		touch($fileTwo);
  1091
+		touch($fileOneA);
902 1092
 
903 1093
 		$Folder = new Folder($folderOne);
904  
-		$result = $Folder->move($folderThree);
  1094
+		$result = $Folder->move(array('to' => $folderTwo, 'scheme' => Folder::SKIP));
905 1095
 		$this->assertTrue($result);
906  
-		$this->assertTrue(file_exists($folderThree . DS . 'file1.php'));
907  
-		$this->assertTrue(is_dir($folderThree . DS . 'folder2'));
908  
-		$this->assertTrue(file_exists($folderThree . DS . 'folder2' . DS . 'file2.php'));
  1096
+		$this->assertTrue(file_exists($folderTwo . DS . 'file1.php'));
  1097
+		$this->assertTrue(is_dir($folderTwo . DS . 'folderA'));
  1098
+		$this->assertTrue(file_exists($folderTwo . DS . 'folderA' . DS . 'fileA.php'));
909 1099
 		$this->assertFalse(file_exists($fileOne));
910  
-		$this->assertFalse(file_exists($folderTwo));
911  
-		$this->assertFalse(file_exists($fileTwo));
  1100
+		$this->assertFalse(file_exists($folderOneA));
  1101
+		$this->assertFalse(file_exists($fileOneA));
912 1102
 
913  
-		$Folder = new Folder($folderThree);
  1103
+		$Folder = new Folder($folderTwo);
914 1104
 		$Folder->delete();
915 1105
 
916 1106
 		new Folder($folderOne, true);
  1107
+		new Folder($folderOneA, true);
917 1108
 		new Folder($folderTwo, true);
918  
-		new Folder($folderThree, true);
919  
-		new Folder($folderThree . DS . 'folder2', true);
  1109
+		new Folder($folderTwoB, true);
920 1110
 		touch($fileOne);
921  
-		touch($fileTwo);
922  
-		file_put_contents($folderThree . DS . 'folder2' . DS . 'file2.php', 'untouched');
  1111
+		touch($fileOneA);
  1112
+		file_put_contents($folderTwoB . DS . 'fileB.php', 'untouched');
923 1113
 
924 1114
 		$Folder = new Folder($folderOne);
925  
-		$result = $Folder->move($folderThree);
  1115
+		$result = $Folder->move(array('to' => $folderTwo, 'scheme' => Folder::SKIP));
926 1116
 		$this->assertTrue($result);
927  
-		$this->assertTrue(file_exists($folderThree . DS . 'file1.php'));
928  
-		$this->assertEquals('untouched', file_get_contents($folderThree . DS . 'folder2' . DS . 'file2.php'));
  1117
+		$this->assertTrue(file_exists($folderTwo . DS . 'file1.php'));
  1118
+		$this->assertEquals('untouched', file_get_contents($folderTwoB . DS . 'fileB.php'));
929 1119
 		$this->assertFalse(file_exists($fileOne));
930  
-		$this->assertFalse(file_exists($folderTwo));
931  
-		$this->assertFalse(file_exists($fileTwo));
  1120
+		$this->assertFalse(file_exists($folderOneA));
  1121
+		$this->assertFalse(file_exists($fileOneA));
932 1122
 
933 1123
 		$Folder = new Folder($path);
934 1124
 		$Folder->delete();
45  lib/Cake/Utility/Folder.php
@@ -22,6 +22,30 @@
22 22
 class Folder {
23 23
 
24 24
 /**
  25
+ * Default scheme for Folder::copy
  26
+ * Recursivly merges subfolders with the same name 
  27
+ *
  28
+ * @constant MERGE
  29
+ */
  30
+	const MERGE = 'merge';
  31
+
  32
+/**
  33
+ * Overwrite scheme for Folder::copy
  34
+ * subfolders with the same name will be replaced
  35
+ *
  36
+ * @constant OVERWRITE
  37
+ */
  38
+	const OVERWRITE = 'overwrite';
  39
+
  40
+/**
  41
+ * Skip scheme for Folder::copy
  42
+ * if a subfolder with the same name exists it will be skipped
  43
+ *
  44
+ * @constant SKIP
  45
+ */
  46
+	const SKIP = 'skip';
  47
+	
  48
+/**
25 49
  * Path to Folder.
26 50
  *
27 51
  * @var string
@@ -594,6 +618,7 @@ public function delete($path = null) {
594 618
  * - `from` The directory to copy from, this will cause a cd() to occur, changing the results of pwd().
595 619
  * - `mode` The mode to copy the files/directories with.
596 620
  * - `skip` Files/directories to skip.
  621
+ * - `scheme` Folder::MERGE, Folder::OVERWRITE, Folder::SKIP
597 622
  *
598 623
  * @param array|string $options Either an array of options (see above) or a string of the destination directory.
599 624
  * @return boolean Success
@@ -608,7 +633,7 @@ public function copy($options = array()) {
608 633
 			$to = $options;
609 634
 			$options = array();
610 635
 		}
611  
-		$options = array_merge(array('to' => $to, 'from' => $this->path, 'mode' => $this->mode, 'skip' => array()), $options);
  636
+		$options = array_merge(array('to' => $to, 'from' => $this->path, 'mode' => $this->mode, 'skip' => array(), 'scheme' => Folder::MERGE), $options);
612 637
 
613 638
 		$fromDir = $options['from'];
614 639
 		$toDir = $options['to'];
@@ -630,10 +655,10 @@ public function copy($options = array()) {
630 655
 
631 656
 		$exceptions = array_merge(array('.', '..', '.svn'), $options['skip']);
632 657
 		if ($handle = @opendir($fromDir)) {
633  
-			while (false !== ($item = readdir($handle))) {
634  
-				if (!in_array($item, $exceptions)) {
635  
-					$from = Folder::addPathElement($fromDir, $item);
636  
-					$to = Folder::addPathElement($toDir, $item);
  658
+			while (($item = readdir($handle)) !== false) {
  659
+				$to = Folder::addPathElement($toDir, $item);
  660
+				if (($options['scheme'] != Folder::SKIP || !is_dir($to)) && !in_array($item, $exceptions)) {
  661
+					$from = Folder::addPathElement($fromDir, $item);				
637 662
 					if (is_file($from)) {
638 663
 						if (copy($from, $to)) {
639 664
 							chmod($to, intval($mode, 8));
@@ -643,6 +668,10 @@ public function copy($options = array()) {
643 668
 							$this->_errors[] = __d('cake_dev', '%s NOT copied to %s', $from, $to);
644 669
 						}
645 670
 					}
  671
+					
  672
+					if (is_dir($from) && file_exists($to) && $options['scheme'] == Folder::OVERWRITE) {
  673
+						$this->delete($to);
  674
+					}
646 675
 
647 676
 					if (is_dir($from) && !file_exists($to)) {
648 677
 						$old = umask(0);
@@ -657,6 +686,9 @@ public function copy($options = array()) {
657 686
 						} else {
658 687
 							$this->_errors[] = __d('cake_dev', '%s not created', $to);
659 688
 						}
  689
+					} elseif (is_dir($from) && $options['scheme'] == Folder::MERGE) {
  690
+						$options = array_merge($options, array('to' => $to, 'from' => $from));
  691
+						$this->copy($options);
660 692
 					}
661 693
 				}
662 694
 			}
@@ -680,8 +712,9 @@ public function copy($options = array()) {
680 712
  * - `from` The directory to copy from, this will cause a cd() to occur, changing the results of pwd().
681 713
  * - `chmod` The mode to copy the files/directories with.
682 714
  * - `skip` Files/directories to skip.
  715
+ * - `scheme` Folder::MERGE, Folder::OVERWRITE, Folder::SKIP
683 716
  *
684  
- * @param array $options (to, from, chmod, skip)
  717
+ * @param array $options (to, from, chmod, skip, scheme)
685 718
  * @return boolean Success
686 719
  * @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#Folder::move
687 720
  */

0 notes on commit 3706853

Please sign in to comment.
Something went wrong with that request. Please try again.