Browse Source

[php7] fix sys.io.File.copy()

Alexander Kuzmenko 8 năm trước cách đây
mục cha
commit
ede7e7f57e
3 tập tin đã thay đổi với 8 bổ sung2 xóa
  1. 1 1
      extra/haxelib_src
  2. 5 0
      std/php7/Global.hx
  3. 2 1
      std/php7/_std/sys/io/File.hx

+ 1 - 1
extra/haxelib_src

@@ -1 +1 @@
-Subproject commit 9d79a55ddb054d79ed8d136f1c0583baa407fd67
+Subproject commit f64c894dfa0fd4d9724c8c4099a44c2d57b4dad3

+ 5 - 0
std/php7/Global.hx

@@ -741,6 +741,11 @@ extern class Global {
 	**/
 	static function rename( oldname:String, newname:String, ?context:Resource ) : Bool;
 
+	/**
+		@see http://php.net/manual/en/function.copy.php
+	**/
+	static function copy( source:String, dest:String, ?context:Resource ) : Bool;
+
 	/**
 		@see http://php.net/manual/en/function.preg-match.php
 	**/

+ 2 - 1
std/php7/_std/sys/io/File.hx

@@ -22,6 +22,7 @@
 package sys.io;
 
 import php.Global.*;
+import php.Global;
 
 @:coreApi class File {
 
@@ -56,7 +57,7 @@ import php.Global.*;
 	}
 
 	public static function copy( srcPath : String, dstPath : String ) : Void {
-		copy(srcPath, dstPath);
+		Global.copy(srcPath, dstPath);
 	}
 
 }