Browse Source

fixed binary flag.

Nicolas Cannasse 19 years ago
parent
commit
f5a687ae08
1 changed files with 3 additions and 3 deletions
  1. 3 3
      std/neko/File.hx

+ 3 - 3
std/neko/File.hx

@@ -113,15 +113,15 @@ class File {
 	}
 
 	public static function read( path : String, binary : Bool ) {
-		return new File(untyped file_open(path.__s,(if( binary ) "r" else "rb").__s));
+		return new File(untyped file_open(path.__s,(if( binary ) "rb" else "r").__s));
 	}
 
 	public static function write( path : String, binary : Bool ) {
-		return new File(untyped file_open(path.__s,(if( binary ) "w" else "wb").__s));
+		return new File(untyped file_open(path.__s,(if( binary ) "wb" else "w").__s));
 	}
 
 	public static function append( path : String, binary : Bool ) {
-		return new File(untyped file_open(path.__s,(if( binary ) "a" else "ab").__s));
+		return new File(untyped file_open(path.__s,(if( binary ) "ab" else "a").__s));
 	}
 
 	private static var file_contents = Lib.load("std","file_contents",1);