/* this function is a POSIX compliant version, which shall check the file named by the pathname pointed to by the path argument for accessibility according to the bit pattern contained in amode. */
int access(const char *path, int amode)
/* this function is a POSIX compliant version, which shall check the file named by the pathname pointed to by the path argument for accessibility according to the bit pattern contained in amode. */
int access(const char *path, int amode)
{
    struct stat sb;
    if (stat(path, &sb) < 0)
        return -1;
    return 0;
}