Anonymous user
Check that file exists: Difference between revisions
Updated D entry
(Updated D entry) |
|||
Line 318:
=={{header|D}}==
<lang d>import std.stdio
void verify(in string name) {
if (name.exists())
writeln("'", name, "' exists");
Line 335 ⟶ 333:
// check in root
verify(
verify(
}</lang>
{{out}}
<pre>'input.txt' doesn't exist
'docs' doesn't exist
'\input.txt' doesn't exist
'\docs' doesn't exist</pre>
=={{header|Delphi}}==
|