Skip to content

Commit

Permalink
Restore compatibility with macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
kylef committed Sep 13, 2016
1 parent 325b908 commit 5e7e09d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Sources/PathKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,11 @@ extension Path {
guard Path.fileManager.fileExists(atPath: normalize().path, isDirectory: &directory) else {
return false
}
#if os(Linux)
return directory
#else
return directory.boolValue
#endif
}

/// Test whether a path is a regular file.
Expand All @@ -240,7 +244,11 @@ extension Path {
guard Path.fileManager.fileExists(atPath: normalize().path, isDirectory: &directory) else {
return false
}
return !directory
#if os(Linux)
return !directory
#else
return !directory.boolValue
#endif
}

/// Test whether a path is a symbolic link.
Expand Down

0 comments on commit 5e7e09d

Please sign in to comment.