dir.c
changeset 9 1155788ccbe3
child 11 677e01f5109e
equal deleted inserted replaced
8:41e4c6031535 9:1155788ccbe3
       
     1 /*
       
     2  * Standard directory I/O support routines for PhysicsFS.
       
     3  *
       
     4  * Please see the file LICENSE in the source's root directory.
       
     5  *
       
     6  *  This file written by Ryan C. Gordon.
       
     7  */
       
     8 
       
     9 #include <stdio.h>
       
    10 #include <stdlib.h>
       
    11 
       
    12 #define __PHYSICSFS_INTERNAL__
       
    13 #include "physfs_internal.h"
       
    14 
       
    15 /* template for filehandles. */
       
    16 const FileHandle __PHYSFS_FileHandle_DIR =
       
    17 {
       
    18     NULL,       /* opaque         */
       
    19     NULL,       /* dirReader      */
       
    20     DIR_read,   /* read() method  */
       
    21     NULL,       /* write() method */
       
    22     DIR_eof,    /* eof() method   */
       
    23     DIR_tell,   /* tell() method  */
       
    24     DIR_seek,   /* seek() method  */
       
    25     DIR_close,  /* close() method */
       
    26 };
       
    27 
       
    28 /* template for directories. */
       
    29 const DirReader __PHYSFS_DirReader_DIR =
       
    30 {
       
    31     NULL,              /* opaque                  */
       
    32     DIR_enumerate,     /* enumerateFiles() method */
       
    33     DIR_isDirectory,   /* isDirectory() method    */
       
    34     DIR_isSymLink,     /* isSymLink() method      */
       
    35     DIR_isOpenable,    /* isOpenable() method     */
       
    36     DIR_openRead,      /* openRead() method       */
       
    37     DIR_dirClose,      /* close() method          */
       
    38 };
       
    39 
       
    40 
       
    41 /* This doesn't get listed, since it's technically not an archive... */
       
    42 #if 0
       
    43 const __PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_DIR =
       
    44 {
       
    45     "DIR",
       
    46     "non-archive directory I/O"
       
    47 };
       
    48 #endif
       
    49 
       
    50 /* end of dir.c ... */
       
    51