home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / desklib / Libraries / File / c / IsDir < prev    next >
Encoding:
Text File  |  1994-05-29  |  986 b   |  32 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for 
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #                                      
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    File.IsDir.c
  12.     Author:  Copyright © 1994 Tim Browse
  13.     Version: 1.00 (04 Mar 1994)
  14.     Purpose: Checks to see if the given file is a directory.
  15. */
  16.  
  17. #include "Core.h"
  18. #include "File.h"
  19. #include "SWI.h"
  20.  
  21. extern BOOL File_IsDirectory(char *pathname)
  22. {
  23.   unsigned type;
  24.   
  25.   /* Get the file information */
  26.   
  27.   SWI(2, 1, SWI_OS_File, 17, pathname, &type);
  28.   
  29.   return (type == 2); /* 2 => directory found */
  30. }
  31.  
  32.