Check that file exists: Difference between revisions
Content added Content deleted
m (→{{header|ALGOL 68}}: typo in comment) |
No edit summary |
||
Line 1,800: | Line 1,800: | ||
end try |
end try |
||
end exists</lang> |
end exists</lang> |
||
=={{header|Vala}}== |
|||
This needs to be compiled with the gio-2.0 package: valac --pkg gio-2.0 check_that_file_exists.vala |
|||
<lang vala>int main (string[] args) { |
|||
string[] files = {"input.txt", "docs", |
|||
Path.DIR_SEPARATOR_S + "input.txt", Path.DIR_SEPARATOR_S + "docs"}; |
|||
foreach (string f in files) { |
|||
var file = File.new_for_path (f); |
|||
print ("%s exists: %s\n", f, file.query_exists ().to_string ()); |
|||
} |
|||
return 0; |
|||
}</lang> |
|||
=={{header|Vedit macro language}}== |
=={{header|Vedit macro language}}== |