Mercurial > projects > mde
comparison mde/file/mergetag/MTTagWriter.d @ 151:e785e98d3b78
Updated for compatibility with tango 0.99.8.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Sat, 04 Apr 2009 17:32:18 +0200 |
parents | 9f035cd139c6 |
children | 1cbde9807293 |
comparison
equal
deleted
inserted
replaced
150:42fb97d9ff9e | 151:e785e98d3b78 |
---|---|
20 | 20 |
21 import mde.file.mergetag.internal; | 21 import mde.file.mergetag.internal; |
22 import mde.file.mergetag.exception; | 22 import mde.file.mergetag.exception; |
23 | 23 |
24 import tango.io.device.File; | 24 import tango.io.device.File; |
25 import tango.io.stream.Buffer; | 25 import tango.io.stream.Buffered; |
26 import tango.util.log.Log : Log, Logger; | 26 import tango.util.log.Log : Log, Logger; |
27 | 27 |
28 private Logger logger; | 28 private Logger logger; |
29 static this() { | 29 static this() { |
30 logger = Log.getLogger ("mde.file.mergetag.MTTagWriter"); | 30 logger = Log.getLogger ("mde.file.mergetag.MTTagWriter"); |
65 | 65 |
66 class MTTTagWriter : MTTagWriter | 66 class MTTTagWriter : MTTagWriter |
67 { | 67 { |
68 /** Opens the file path for writing. Call close() when done! */ | 68 /** Opens the file path for writing. Call close() when done! */ |
69 this (char[] path) { | 69 this (char[] path) { |
70 buffer = new BufferOutput (new File (path, File.WriteCreate)); | 70 buffer = new BufferedOutput (new File (path, File.WriteCreate)); |
71 | 71 |
72 buffer.append ("{" ~ CurrentVersionString ~ "}" ~ Eol); | 72 buffer.append ("{" ~ CurrentVersionString ~ "}" ~ Eol); |
73 } | 73 } |
74 | 74 |
75 void sectionTag (char[] section) { | 75 void sectionTag (char[] section) { |
85 buffer.flush; | 85 buffer.flush; |
86 buffer.close; | 86 buffer.close; |
87 } | 87 } |
88 | 88 |
89 private: | 89 private: |
90 scope BufferOutput buffer; | 90 scope BufferedOutput buffer; |
91 } | 91 } |
92 | 92 |
93 class MTBTagWriter : MTTagWriter | 93 class MTBTagWriter : MTTagWriter |
94 { | 94 { |
95 this (char[] path) { | 95 this (char[] path) { |