瀏覽代碼

Do not pass _s to file functions

Hugh Sanderson 15 年之前
父節點
當前提交
3f2158a65d
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      std/cpp/io/File.hx

+ 3 - 3
std/cpp/io/File.hx

@@ -48,15 +48,15 @@ class File {
 	}
 	}
 
 
 	public static function read( path : String, binary : Bool ) {
 	public static function read( path : String, binary : Bool ) {
-		return new FileInput(untyped file_open(path,(if( binary ) "rb" else "r")));
+		return new FileInput(file_open(path,(if( binary ) "rb" else "r")));
 	}
 	}
 
 
 	public static function write( path : String, binary : Bool ) {
 	public static function write( path : String, binary : Bool ) {
-		return new FileOutput(untyped file_open(path.__s,(if( binary ) "wb" else "w")));
+		return new FileOutput(file_open(path,(if( binary ) "wb" else "w")));
 	}
 	}
 
 
 	public static function append( path : String, binary : Bool ) {
 	public static function append( path : String, binary : Bool ) {
-		return new FileOutput(untyped file_open(path.__s,(if( binary ) "ab" else "a")));
+		return new FileOutput(file_open(path,(if( binary ) "ab" else "a")));
 	}
 	}
 
 
 	public static function copy( src : String, dst : String ) {
 	public static function copy( src : String, dst : String ) {