Browse Source

make binary flag 'true' by default

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

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

@@ -46,15 +46,15 @@ class File {
 		return neko.Lib.bytesReference(getContent(path));
 	}
 
-	public static function read( path : String, binary : Bool ) {
+	public static function read( path : String, binary : Bool = true ) {
 		return new FileInput(untyped file_open(path.__s,(if( binary ) "rb" else "r").__s));
 	}
 
-	public static function write( path : String, binary : Bool ) {
+	public static function write( path : String, binary : Bool = true ) {
 		return new FileOutput(untyped file_open(path.__s,(if( binary ) "wb" else "w").__s));
 	}
 
-	public static function append( path : String, binary : Bool ) {
+	public static function append( path : String, binary : Bool = true ) {
 		return new FileOutput(untyped file_open(path.__s,(if( binary ) "ab" else "a").__s));
 	}