Create empty markdown files for elements
This commit is contained in:
@ -150,9 +150,12 @@ final class FileSystem {
|
||||
}
|
||||
}
|
||||
|
||||
func contentOfOptionalFile(atPath path: String, source: String) -> String? {
|
||||
func contentOfOptionalFile(atPath path: String, source: String, createEmptyFileIfMissing: Bool = false) -> String? {
|
||||
let url = input.appendingPathComponent(path)
|
||||
guard exists(url) else {
|
||||
if createEmptyFileIfMissing {
|
||||
try? Data().write(to: url)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user