About the check file or directory exists

I want to ask how to use “check file or directory exists”
I’m using a file that’s in resources and I’m using it.
And tried the three methods of “path + file name”, “file name” and “path”, but none of them succeeded.
I want to use this in the program to avoid the bug caused by some characters not having some voices.

The condition is for desktops only, and is to check if a file/folder exists on the computer. Not the project resources.

Keep in mind resources don’t “exist” as separate files once you export to an exe/apk (they are bundled into a .asar file on desktop, and merged into the package on mobile, so you cannot check against them existing in your logic)