I work in a project and I need to know if a file is unique in a directory or not.
So how can I find if a file exists in a directory or not?
I have the file name without extension and the path of the directory.
I work in a project and I need to know if a file is
Share
There’s no ready-made function for this I think, but you can use something like this:
This verifies that it’s a “normal” file. You might want to add/remove flag checks if you want to deal with hidden files, too.