Skip to content

Commit 83aef4e

Browse files
committed
- Use canImport(Darwin) instead of just os(macOS)
- Add #error for non Linux/Darwin implementations, to be filled in later.
1 parent 98fb587 commit 83aef4e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Foundation/FileManager.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ open class FileManager : NSObject {
4747
urls.append(URL(fileURLWithPath: mountPoint[1], isDirectory: true))
4848
}
4949
}
50-
#elseif os(macOS)
50+
#elseif canImport(Darwin)
5151

5252
func mountPoints(_ statBufs: UnsafePointer<statfs>, _ fsCount: Int) -> [URL] {
5353
var urls: [URL] = []
@@ -88,6 +88,8 @@ open class FileManager : NSObject {
8888
}
8989
urls = mountPoints(statBuf, Int(fsCount))
9090
}
91+
#else
92+
#error("Requires a platform-specific implementation")
9193
#endif
9294
return urls
9395
}

0 commit comments

Comments
 (0)