physfs_internal.h
changeset 12 a4041c91d715
parent 11 677e01f5109e
child 15 418eacc97ac8
equal deleted inserted replaced
11:677e01f5109e 12:a4041c91d715
    86          */
    86          */
    87     const struct __PHYSFS_DIRFUNCTIONS__ *funcs;
    87     const struct __PHYSFS_DIRFUNCTIONS__ *funcs;
    88 } DirHandle;
    88 } DirHandle;
    89 
    89 
    90 
    90 
       
    91 typedef struct __PHYSFS_LINKEDSTRINGLIST__
       
    92 {
       
    93     char *str;
       
    94     struct __PHYSFS_LINKEDSTRINGLIST__ *next;
       
    95 } LinkedStringList;
       
    96 
    91 /*
    97 /*
    92  * Symlinks should always be followed; PhysicsFS will use
    98  * Symlinks should always be followed; PhysicsFS will use
    93  *  DirFunctions->isSymLink() and make a judgement on whether to
    99  *  DirFunctions->isSymLink() and make a judgement on whether to
    94  *  continue to call other methods based on that.
   100  *  continue to call other methods based on that.
    95  */
   101  */
   108          *  return (NULL) on error.
   114          *  return (NULL) on error.
   109          */
   115          */
   110     DirHandle *(*openArchive)(const char *name);
   116     DirHandle *(*openArchive)(const char *name);
   111 
   117 
   112         /*
   118         /*
   113          * Returns a list (freeable via PHYSFS_freeList()) of
   119          * Returns a list of all files in dirname. Each element of this list
   114          *  all files in dirname.
   120          *  (and its "str" field) will be deallocated with the system's free()
       
   121          *  function by the caller, so be sure to explicitly malloc() each
       
   122          *  chunk.
       
   123          * If you have a memory failure, return as much as you can.
   115          *  This dirname is in platform-independent notation.
   124          *  This dirname is in platform-independent notation.
   116          */
   125          */
   117     char **(*enumerateFiles)(DirHandle *r, const char *dirname);
   126     LinkedStringList **(*enumerateFiles)(DirHandle *r, const char *dirname);
   118 
   127 
   119         /*
   128         /*
   120          * Returns non-zero if filename is really a directory.
   129          * Returns non-zero if filename is really a directory.
   121          *  This filename is in platform-independent notation.
   130          *  This filename is in platform-independent notation.
   122          */
   131          */