> On Mar 10, 2017, at 12:32 PM, Proyb P via swift-users <[email protected]>
> wrote:
>
> MacOS shown different behavior.
Running a playground using Xcode 8.2.1 on macOS 10.12.3 your code returns true
and the isDir value is also true.
Are you sure the directory “files” exists on your macOS test environment?
let filename = ""
let checkfile = FileManager.default
var isDir : ObjCBool = false
if checkfile.fileExists(atPath: "."+filename, isDirectory: &isDir) {
print("true, directory = \(isDir)")
} else {
print("false")
}
results in this output: "true, directory = true”
Marc
_______________________________________________
swift-users mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-users