Check that file exists: Difference between revisions
Content added Content deleted
m (Update Lang example: Fix spelling of Lang) |
(New post using C++ 17 syntax. An existing post using an external library, boost, was retained.) |
||
Line 965: | Line 965: | ||
testfile("/docs"); |
testfile("/docs"); |
||
}</syntaxhighlight> |
}</syntaxhighlight> |
||
===Using C++ 17=== |
|||
<syntaxhighlight lang="c++"> |
|||
#include <iostream> |
|||
#include <filesystem> |
|||
int main() { |
|||
std::cout << std::filesystem::exists("hello_world.txt") << std::endl; |
|||
} |
|||
</syntaxhighlight> |
|||
=={{header|Clojure}}== |
=={{header|Clojure}}== |
||
<syntaxhighlight lang="clojure"> |
<syntaxhighlight lang="clojure"> |