fileExists

public func fileExists(String) -> Bool

Returns true if any filesystem entry exists at path.

Wraps access(path, F_OK). Does not distinguish files from directories or symlinks (a dangling symlink reports as nonexistent because access follows symlinks). For the type, follow up with isFile / isDirectory.

Examples

if fileExists("/tmp/foo") { // ... }

Defined in lang/std/os/fs.ks