From 70dff9fc275622c1faf5558b998f8e6626feb822 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Thu, 14 Apr 2016 21:08:58 +0100 Subject: Change CsharpBackend to take output file path --- .../org/zwobble/couscous/backends/csharp/CsharpBackend.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/org/zwobble/couscous/backends/csharp/CsharpBackend.java b/src/main/java/org/zwobble/couscous/backends/csharp/CsharpBackend.java index 7785ec5..380d84f 100644 --- a/src/main/java/org/zwobble/couscous/backends/csharp/CsharpBackend.java +++ b/src/main/java/org/zwobble/couscous/backends/csharp/CsharpBackend.java @@ -24,19 +24,19 @@ public class CsharpBackend implements Backend { "java/lang/Iterable.cs", "java/util/Iterator.cs"); - private final Path directoryPath; + private final Path outputFilePath; private final String namespace; - public CsharpBackend(Path directoryPath, String namespace) { - this.directoryPath = directoryPath; + public CsharpBackend(Path outputFilePath, String namespace) { + this.outputFilePath = outputFilePath; this.namespace = namespace; } @Override public void compile(List classes) throws IOException { - directoryPath.toFile().mkdirs(); + outputFilePath.getParent().toFile().mkdirs(); Files.write( - directoryPath.resolve("Program.cs"), + outputFilePath, Iterables.concat( transform( classes, -- cgit v1.2.3