<div dir="ltr"><div>let filename = ""<br></div>
let checkfile = FileManager.default<br>var isDir : ObjCBool = false<br>if checkfile.fileExists(atPath: "files/"+filename, isDirectory: &isDir) {<div>print("true")<br><div>} else {</div><div>print("false")</div><div>}</div></div><div><br></div><div>On Linux, if the "filename" variable is empty string, checkfile will returns as true which should be return as false since the file is not found. macOS is working fine.</div><div><br></div><div>A temporary workarounds is to use</div><div>let filename = "NOTFOUND"<br></div></div>