mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 01:44:37 +00:00
@@ -540,7 +540,8 @@ proc writeConfig*(dict: Config, filename: string) =
|
||||
## Writes the contents of the table to the specified configuration file.
|
||||
## Note: Comment statement will be ignored.
|
||||
let file = open(filename, fmWrite)
|
||||
let fileStream = newFileStream(filename)
|
||||
defer: file.close()
|
||||
let fileStream = newFileStream(file)
|
||||
defer: fileStream.close()
|
||||
dict.writeConfig(fileStream)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user