Ask coding questions

← Back to all posts
How to check if a file exists
h
JacobMcPherson1 (189)

How am I able to check if a file already exists in the repl

Comments
hotnewtop
2plus2is4hoi (92)

Use the system() function is the c++ access to the bash commands. Then refer to this article: https://linuxize.com/post/bash-check-if-file-exists/

Good luck!

JacobMcPherson1 (189)

@2plus2is4hoi I found out a way to do it right before you commented. Sorry lol