home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-09-05 | 972 b | 39 lines | [TEXT/CWIE] |
- /* dirent.h */
- /* 05Sep95 e */
-
- // per Berkeley dirent.h
- /*
- * A directory entry has a struct dirent at the front of it, containing its
- * inode number, the length of the entry, and the length of the name
- * contained in the entry. These are followed by the name padded to a 4
- * byte boundary with null bytes. All names are guaranteed null terminated.
- * The maximum length of a name in a directory is MAXNAMLEN.
- */
-
- #define MAXNAMLEN 255
-
- struct dirent {
- unsigned long d_fileno; /* file number of entry */
- unsigned short d_reclen; /* length of this record */
- unsigned short d_namlen; /* length of string in d_name */
- char d_name[MAXNAMLEN + 1]; /* name must be no longer than this */
- };
-
- struct _open_dir
- { short openp;
- short ioVRefNum;
- long dirID;
- long numFiles;
- long index;
- struct dirent entry;
- };
-
- #define DIR struct _open_dir
-
- DIR *opendir(const char *);
- struct dirent *readdir(DIR *);
- void rewinddir(DIR *);
- int closedir(DIR *);
-
- /* ** */
-