exists function
Returns true if the given path exists. It may be a file, directory or link.
If followLinks is true (the default) then exists
follows any links and returns true/false based on
whether the resolved path exists.
If followLinks is false then exists will return
true if path exist.
if (exists("/fred.txt"))
Throws ArgumentError if path is null or an empty string.
See:
Implementation
bool exists(String path, {bool followLinks = true}) =>
    core.exists(path, followLinks: followLinks);