We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17d3594 commit c0c0eddCopy full SHA for c0c0edd
Sources/SwiftAstGenLib/SwiftAstGenerator.swift
@@ -10,14 +10,13 @@ public class SwiftAstGenerator {
10
self.srcDir = srcDir
11
self.outputDir = outputDir
12
self.prettyPrint = prettyPrint
13
- if FileManager.default.fileExists(atPath: outputDir.path) {
14
- try FileManager.default.removeItem(at: outputDir)
+ if !FileManager.default.fileExists(atPath: outputDir.path) {
+ try FileManager.default.createDirectory(
15
+ atPath: outputDir.path,
16
+ withIntermediateDirectories: true,
17
+ attributes: nil
18
+ )
19
}
- try FileManager.default.createDirectory(
- atPath: outputDir.path,
- withIntermediateDirectories: true,
- attributes: nil
20
- )
21
22
23
private func ignoreDirectory(name: String) -> Bool {
0 commit comments