home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Headers / misckit / MiscFile+Unix.h < prev    next >
Encoding:
Text File  |  1995-01-26  |  1.8 KB  |  64 lines

  1.  
  2. /************************************************************************
  3.   CATEGORY:            MiscFile (Unix)
  4.   PROGRAMMER:        Todd Thomas, Copyright 1994, 1995.
  5.   BEGAN:            December 22, 1994
  6.   LAST CHANGED:        January 25, 1995
  7.   CHANGES:            -
  8.   VERSION:            0.2
  9.   DECLARED IN:        <misckit/MiscFile.h>
  10.     
  11.   Provides wrappers for the lower level file Unix stuff. Therefore, if the 
  12.   underlying OS calls change with OpenStep then we should only have to change 
  13.   this category. Most of the methods her follow the file functions lead, and     
  14.   return either MISCFILE_SUCCESS (0) or MISCFILE_ERROR (-1).
  15.  
  16.   This object is included in the MiscKit by permission from the author
  17.   and its use is governed by the MiscKit license, found in the file
  18.   "LICENSE.rtf" in the MiscKit distribution.  Please refer to that file
  19.   for a list of all applicable permissions and restrictions.
  20.        
  21.  *************************************************************************/
  22.  
  23.  
  24. @interface MiscFile (Unix)
  25.  
  26. + (BOOL)useLinkInfo;
  27. + setUseLinkInfo: (BOOL)linkInfo;
  28.  
  29. // When manipulating the characteristics of the file there may be errors.
  30. - (int)errorCode;
  31.  
  32. // Enable caching when stating the file.
  33. - (BOOL)enableCaching;
  34. - setEnableCaching: (BOOL)cache;
  35.  
  36. // Methods for getting information about the receiving MiscFile.
  37. - (int)access: (int)mode;
  38. - (struct stat *)lstat;
  39. - (struct stat *)stat;
  40.  
  41. // Depending upon the value of [MiscFile useLinkInfo] will call either
  42. // stat or lstat.
  43. - (struct stat *)whichStat;
  44.  
  45. // Methods for changing the receiving MiscFile's characteristics.
  46. - (int)chmod: (unsigned short)mode;
  47. - (int)chown: (uid_t)owner group: (gid_t)group;
  48.  
  49. // Methods for creating new files.
  50. - (int)link: (const char *)newpath;
  51. - (int)symlink: (const char *)newpath;
  52.  
  53. - (int)readlink: (char *)linkPath pathLen: (int)len;
  54.  
  55. @end
  56.  
  57.  
  58. @interface MiscFile (UnixPrivate)
  59.  
  60. - _setErrorCode: (int)retValue;
  61.  
  62. @end
  63.  
  64.