home *** CD-ROM | disk | FTP | other *** search
-
- /************************************************************************
- CATEGORY: MiscFile (Unix)
- PROGRAMMER: Todd Thomas, Copyright 1994, 1995.
- BEGAN: December 22, 1994
- LAST CHANGED: January 25, 1995
- CHANGES: -
- VERSION: 0.2
- DECLARED IN: <misckit/MiscFile.h>
-
- Provides wrappers for the lower level file Unix stuff. Therefore, if the
- underlying OS calls change with OpenStep then we should only have to change
- this category. Most of the methods her follow the file functions lead, and
- return either MISCFILE_SUCCESS (0) or MISCFILE_ERROR (-1).
-
- This object is included in the MiscKit by permission from the author
- and its use is governed by the MiscKit license, found in the file
- "LICENSE.rtf" in the MiscKit distribution. Please refer to that file
- for a list of all applicable permissions and restrictions.
-
- *************************************************************************/
-
-
- @interface MiscFile (Unix)
-
- + (BOOL)useLinkInfo;
- + setUseLinkInfo: (BOOL)linkInfo;
-
- // When manipulating the characteristics of the file there may be errors.
- - (int)errorCode;
-
- // Enable caching when stating the file.
- - (BOOL)enableCaching;
- - setEnableCaching: (BOOL)cache;
-
- // Methods for getting information about the receiving MiscFile.
- - (int)access: (int)mode;
- - (struct stat *)lstat;
- - (struct stat *)stat;
-
- // Depending upon the value of [MiscFile useLinkInfo] will call either
- // stat or lstat.
- - (struct stat *)whichStat;
-
- // Methods for changing the receiving MiscFile's characteristics.
- - (int)chmod: (unsigned short)mode;
- - (int)chown: (uid_t)owner group: (gid_t)group;
-
- // Methods for creating new files.
- - (int)link: (const char *)newpath;
- - (int)symlink: (const char *)newpath;
-
- - (int)readlink: (char *)linkPath pathLen: (int)len;
-
- @end
-
-
- @interface MiscFile (UnixPrivate)
-
- - _setErrorCode: (int)retValue;
-
- @end
-
-