methods involving I/O have an asynchronous variant which returns a <a href="dart-async/Future-class.html">Future</a>.
This future completes when the I/O operation finishes. While the I/O
operation is in progress, the Dart program is not blocked,
and can perform other operations.</p>
<p>For example,
the <a href="dart-io/FileSystemEntity/exists.html">exists</a> method, which determines whether the directory exists,
returns a boolean value using a Future.
Use <code>then</code> to register a callback function, 