Check that file exists: Difference between revisions

Content added Content deleted
(added langur language example)
Line 1,947: Line 1,947:


=={{header|langur}}==
=={{header|langur}}==
Use the prop() function, which returns a hash of file/directory properties.
The prop() function returns a hash of file/directory properties.
{{works with|langur|0.12.7}}
<syntaxhighlight lang="langur">val .printresult = f(.file) {
<syntaxhighlight lang="langur">val .printresult = f(.file) {
write .file, ": "
write .file, ": "
Line 1,958: Line 1,957:
}
}
} else {
} else {
writeln "nothing"
writeln "not found or not accessible"
}
}
}
}