home *** CD-ROM | disk | FTP | other *** search
- /*
- IXFileRecord.h
- Copyright 1991, NeXT Computer, Inc.
- */
-
- #import <bsd/sys/stat.h>
- #import <objc/hashtable.h>
- #import <objc/Object.h>
- #import <remote/transport.h>
-
- #import "protocols.h"
-
- @class IXFileFinder;
-
- // These are atoms for the standard file attributes.
-
- extern NXAtom IXFileNameAttribute;
- extern NXAtom IXBaseNameAttribute;
- extern NXAtom IXFileTypeAttribute;
- extern NXAtom IXFileDeviceAttribute;
- extern NXAtom IXFileInodeAttribute;
- extern NXAtom IXFileModeAttribute;
- extern NXAtom IXFileLinksAttribute;
- extern NXAtom IXFileOwnerAttribute;
- extern NXAtom IXFileGroupAttribute;
- extern NXAtom IXFileSizeAttribute;
- extern NXAtom IXAccessTimeAttribute;
- extern NXAtom IXModifyTimeAttribute;
- extern NXAtom IXChangeTimeAttribute;
- extern NXAtom IXUnixTypeAttribute;
-
-
- typedef enum IXUnixType {
- IXUnixFile, IXUnixDirectory,
- IXUnixBlock, IXUnixCharacter, IXUnixLink, IXUnixSocket
- } IXUnixType;
-
- @interface IXFileRecord: Object <NXTransport, IXAttributeBinding>
- {
- id _bindings;
- @public
- unsigned filedate;
- IXFileFinder *fileFinder;
- char *filename;
- char *filetype;
- char *description;
- struct stat *statBuffer;
- }
-
- - (IXFileFinder *)fileFinder;
- - initWithFileFinder:(IXFileFinder *)aFinder;
- - setFileFinder:(IXFileFinder *)aFinder;
-
- - (const struct stat *)statBuffer; // stats file if necessary
-
- - (IXUnixType)unixType; // returns the unix type of the file
-
- - (ino_t)fileInode; // returns the inode number
- - (dev_t)fileDevice; // returns the device number
-
- - (unsigned short)fileMode; // returns the file mode
- - (short)fileLinks; // returns the number of links to the file
-
- - (gid_t)fileGroup; // returns the file's group id
- - (uid_t)fileOwner; // returns the file's owner id
-
- - (off_t)fileSize; // returns the file size in bytes
-
- - (time_t)accessTime; // returns the time of the last access
- - (time_t)changeTime; // returns the time of the last change
- - (time_t)modifyTime; // returns the time of the last update
-
- - (BOOL)hasBindings; // returns TRUE if the receiver has bindings
- - (IXAttributeBinder *)attributeBinder; // returns the receiver's binder
- - freeBindings; // frees the receiver's attribute bindings
-
- - (const char *)filename; // returns the recorded file name
- - setFilename:(const char *)name; // sets the recorded file name
- - (const char *)basename; // returns the recorded base name
-
- - (const char *)filetype; // returns the recorded file type
- - setFiletype:(const char *)type; // sets the recorded file type
-
- - (const char *)description; // returns the recorded description
- - setDescription:(const char *)aDescription; // sets the recorded description
-
- - (unsigned)filedate; // returns the recorded modification date
- - setFiledate:(unsigned)date; // sets the recorded modification date
-
- @end
-
-