File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: a251343fabe5fbb02481f042f38d3a401601ccb6
2
+ refs/heads/master: e890383db1930d0628f487f0008f1a9c2837c7fa
Original file line number Diff line number Diff line change @@ -266,6 +266,16 @@ fn file_writer(str path, vec[fileflag] flags) -> writer {
266
266
ret new_writer ( file_buf_writer ( path, flags) ) ;
267
267
}
268
268
269
+ // TODO: fileflags
270
+ fn buffered_file_buf_writer ( str path ) -> buf_writer {
271
+ auto f = os. libc . fopen ( _str. buf ( path) , _str. buf ( "w" ) ) ;
272
+ if ( f as uint == 0 u) {
273
+ log "error opening " + path;
274
+ fail;
275
+ }
276
+ ret FILE_writer ( f, true ) ;
277
+ }
278
+
269
279
// FIXME it would be great if this could be a const
270
280
fn stdout ( ) -> writer {
271
281
ret new_writer ( fd_buf_writer ( 1 , false ) ) ;
You can’t perform that action at this time.
0 commit comments