File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -98,11 +98,20 @@ UInt8[]
9898To use it correctly, either call ` flush ` , or close the writer first (which also closes the underlying stream).
9999It is recommended to use readers and writers to ` do ` syntax in the form:
100100``` julia
101- Writer (open (my_file )) do writer
101+ FASTAWriter (open (my_path, " w " )) do writer
102102 for record in my_records
103103 write (writer, record)
104104 end
105105end
106106```
107107
108- Which will work for most underlying IO types.
108+ Which will work for most underlying IO types, and will close the writer when the function returns (hence also closing the underlying IO).
109+
110+ Alternatively, the following syntax may be used:
111+ ``` julia
112+ open (FASTAWriter, my_path) do writer
113+ for record in my_records
114+ write (writer, record)
115+ end
116+ end
117+ ```
You can’t perform that action at this time.
0 commit comments