mirror of
https://github.com/nicklockwood/SwiftFormat.git
synced 2026-05-17 10:30:35 +00:00
14 lines
318 B
Swift
14 lines
318 B
Swift
var contents: String {
|
|
get async throws {
|
|
guard let url = Bundle.main.url(forResource: filename, withExtension: nil) else {
|
|
throw FileError.missing
|
|
}
|
|
|
|
do {
|
|
return try String(contentsOf: url)
|
|
} catch {
|
|
throw FileError.unreadable
|
|
}
|
|
}
|
|
}
|