aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/firrtl/FileUtils.scala
AgeCommit message (Collapse)Author
2020-08-14All of src/ formatted with scalafmtchick
2019-08-05Iterate 1x in FileUtils.getText, DRY out getTextSchuyler Eldridge
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
2019-08-01Followup to PR #1142chick
- use scala.io.Source instead of io.Source - .toList cleaner way to force stream to be read. - clear old commented out code in ProtoBufSpec
2019-08-01Followup to PR #1142chick
Fixes a threading bug in where lazy reading of file caused a problem for multithreaded access to the that was read. Changes all uses of io.Source to use new API getText getLines getTextResource getLinesResouce Make style to only import FileUtils and not its methods So code is more explicit as e.g. FileUtils.getText()
2019-07-31io.Source is not closed when used in most common text reading idiom (#1142)Chick Markley
- Provide new tools for reading in text - from a file - from a string file name - from a resource file - text can be read in as - a single string with newlines - a seq of strings, one string per line - FileUtils put in its own file - in same package to keep existing API the same Hopefully this will protect users from creating resource leaks that may explain sbt crashing. Also simpler interface should make code more streamlined, existing uses of io.Source seem often to be converting between text and seq unnecessarily. Add note of caution on requiring slash on resource readers