dir.c
changeset 11 677e01f5109e
parent 9 1155788ccbe3
child 14 7d822f0d5f57
equal deleted inserted replaced
10:45bd486c0224 11:677e01f5109e
    10 #include <stdlib.h>
    10 #include <stdlib.h>
    11 
    11 
    12 #define __PHYSICSFS_INTERNAL__
    12 #define __PHYSICSFS_INTERNAL__
    13 #include "physfs_internal.h"
    13 #include "physfs_internal.h"
    14 
    14 
    15 /* template for filehandles. */
    15 static const FileFunctions __PHYSFS_FileHandle_DIR =
    16 const FileHandle __PHYSFS_FileHandle_DIR =
       
    17 {
    16 {
    18     NULL,       /* opaque         */
       
    19     NULL,       /* dirReader      */
       
    20     DIR_read,   /* read() method  */
    17     DIR_read,   /* read() method  */
    21     NULL,       /* write() method */
    18     NULL,       /* write() method */
    22     DIR_eof,    /* eof() method   */
    19     DIR_eof,    /* eof() method   */
    23     DIR_tell,   /* tell() method  */
    20     DIR_tell,   /* tell() method  */
    24     DIR_seek,   /* seek() method  */
    21     DIR_seek,   /* seek() method  */
    25     DIR_close,  /* close() method */
    22     DIR_close,  /* close() method */
    26 };
    23 };
    27 
    24 
    28 /* template for directories. */
    25 
    29 const DirReader __PHYSFS_DirReader_DIR =
    26 static const FileFunctions __PHYSFS_FileHandle_DIRW =
    30 {
    27 {
    31     NULL,              /* opaque                  */
    28     NULL,       /* read() method  */
       
    29     DIR_write,  /* write() method */
       
    30     DIR_eof,    /* eof() method   */
       
    31     DIR_tell,   /* tell() method  */
       
    32     DIR_seek,   /* seek() method  */
       
    33     DIR_close,  /* close() method */
       
    34 };
       
    35 
       
    36 
       
    37 const DirFunctions __PHYSFS_DirFunctions_DIR =
       
    38 {
       
    39     DIR_isArchive,     /* isArchive() method      */
       
    40     DIR_openArchive,   /* openArchive() method    */
    32     DIR_enumerate,     /* enumerateFiles() method */
    41     DIR_enumerate,     /* enumerateFiles() method */
    33     DIR_isDirectory,   /* isDirectory() method    */
    42     DIR_isDirectory,   /* isDirectory() method    */
    34     DIR_isSymLink,     /* isSymLink() method      */
    43     DIR_isSymLink,     /* isSymLink() method      */
    35     DIR_isOpenable,    /* isOpenable() method     */
    44     DIR_isOpenable,    /* isOpenable() method     */
    36     DIR_openRead,      /* openRead() method       */
    45     DIR_openRead,      /* openRead() method       */
       
    46     DIR_openWrite,     /* openWrite() method      */
    37     DIR_dirClose,      /* close() method          */
    47     DIR_dirClose,      /* close() method          */
    38 };
    48 };
    39 
    49 
    40 
    50 
    41 /* This doesn't get listed, since it's technically not an archive... */
    51 /* This doesn't get listed, since it's technically not an archive... */