home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / LIBSRC.ZOO / libsrc / local / access.c < prev    next >
Text File  |  1992-02-16  |  338b  |  20 lines

  1. #define INCL_DOSFILEMGR
  2. #include <os2.h>
  3. #include <unistd.h>
  4.  
  5. ULONG Dos32QueryPathInfo() asm ("Dos32QueryPathInfo");
  6.  
  7. int access (const char *path, int mode)
  8. {
  9.    FILESTATUS fs;
  10.    ULONG rc;
  11.  
  12.    rc = Dos32QueryPathInfo ((PSZ)path, 1, (PBYTE)&fs, sizeof (FILESTATUS));
  13.  
  14.    if (rc)
  15.       return (-1);
  16.  
  17.    return (0);
  18. }
  19.  
  20.