diff --git a/src/file.php b/src/file.php index c5c30a4..5ddc3b1 100644 --- a/src/file.php +++ b/src/file.php @@ -29,7 +29,7 @@ class file { return $file; } - static function writer($output, ?string $mode=null, ?callable $func=null): FileWriter { + static function writer($output, ?string $mode="w+b", ?callable $func=null): FileWriter { $file = new FileWriter(self::fix_dash($output), $mode); if ($func !== null) { try {