Anonymous user
Check that file exists: Difference between revisions
add scala
(added Nemerle) |
(add scala) |
||
Line 1,040:
if #f isDir() = 0 then print "This is a directory"
</lang>
=={{header|Scala}}==
<lang scala>import java.io.File
println(new File('input.txt').exists)
println(new File('/input.txt').exists)
println(new File('docs').exists)
println(new File('/docs').exists)</lang>
=={{header|Scheme}}==
|