bool isFileSync(String path)

Synchronously checks if typeSync(path) returns FileSystemEntityType.FILE.

Source

static bool isFileSync(String path) =>
    (_getTypeSync(path, true) == FileSystemEntityType.FILE._type);