Possible Duplicate:
C check if file exists
I was just wondering if someone could point me in the right direction regarding to how I should go about checking if a file exists? At this point in time I plan on going with something along the lines of the following;
if(NULL==(fp=fopen(filepath, "r"))){
my ultimate goal would be to find a solution to replace this in bash (just the file finding part)
if ! (find /dev/shm/request-summon-*-$MCEXEC_PLAYERNAME.txt > /dev/null 2>&1); then
any help is really appreciated, thanks!