Check that file exists: Difference between revisions
Content added Content deleted
m (→{{header|Stata}}: stored as string, would be an error without the macro quotes) |
|||
Line 1,041: | Line 1,041: | ||
=={{header|I}}== |
=={{header|I}}== |
||
<lang i> |
<lang i>concept exists(path) { |
||
open(path) |
|||
errors { |
|||
if error.DoesNotExist() |
|||
print( |
print(path, " does not exist!") |
||
end |
|||
return |
return |
||
} |
} |
||
print( |
print(path, " exists!") |
||
close(file) |
|||
} |
} |
||
Line 1,056: | Line 1,057: | ||
exists("docs") |
exists("docs") |
||
exists("/docs") |
exists("/docs") |
||
exists("docs/Abdu'l-Bahá.txt") |
|||
}</lang> |
}</lang> |
||