return true if the file exists
| 965 | |
| 966 | // return true if the file exists |
| 967 | bool |
| 968 | MetaImage::M_FileExists(const char * filename) |
| 969 | { |
| 970 | #ifdef _MSC_VER |
| 971 | # define access _access |
| 972 | #endif |
| 973 | #ifndef R_OK |
| 974 | # define R_OK 04 |
| 975 | #endif |
| 976 | if (access(filename, R_OK) != 0) |
| 977 | { |
| 978 | return false; |
| 979 | } |
| 980 | else |
| 981 | { |
| 982 | return true; |
| 983 | } |
| 984 | } |
| 985 | |
| 986 | bool |
| 987 | MetaImage::FileIsFullPath(const char * in_name) |