C/C++ User's Journal STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ... ATLSTL - where the Standard Template Library meets the Active Template Library COMSTL - where the Standard Template Library meets the Component Object Model
Synesis Software InetSTL - where the Standard Template Library meets the Internet UNIXSTL - Template Software for the UNIX Operating System WinSTL - where the Standard Template Library meets the Win32 API

recls/recls.h

Go to the documentation of this file.
00001 /* /////////////////////////////////////////////////////////////////////////////
00002  * File:        recls/recls.h
00003  *
00004  * Purpose:     Main header file for the recls API.
00005  *
00006  * Created:     15th August 2003
00007  * Updated:     2nd June 2007
00008  *
00009  * Home:        http://recls.org/
00010  *
00011  * Copyright (c) 2003-2007, Matthew Wilson and Synesis Software
00012  * All rights reserved.
00013  *
00014  * Redistribution and use in source and binary forms, with or without
00015  * modification, are permitted provided that the following conditions are met:
00016  *
00017  * - Redistributions of source code must retain the above copyright notice, this
00018  *   list of conditions and the following disclaimer.
00019  * - Redistributions in binary form must reproduce the above copyright notice,
00020  *   this list of conditions and the following disclaimer in the documentation
00021  *   and/or other materials provided with the distribution.
00022  * - Neither the name(s) of Matthew Wilson and Synesis Software nor the names of
00023  *   any contributors may be used to endorse or promote products derived from
00024  *   this software without specific prior written permission.
00025  *
00026  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00027  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00028  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00029  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
00030  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00031  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00032  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00033  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00034  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00035  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00036  * POSSIBILITY OF SUCH DAMAGE.
00037  *
00038  * ////////////////////////////////////////////////////////////////////////// */
00039 
00040 
00046 #ifndef RECLS_INCL_RECLS_H_RECLS
00047 #define RECLS_INCL_RECLS_H_RECLS
00048 
00049 /* File version */
00050 #ifndef RECLS_DOCUMENTATION_SKIP_SECTION
00051 # define RECLS_VER_RECLS_H_RECLS_MAJOR      3
00052 # define RECLS_VER_RECLS_H_RECLS_MINOR      8
00053 # define RECLS_VER_RECLS_H_RECLS_REVISION   7
00054 # define RECLS_VER_RECLS_H_RECLS_EDIT       81
00055 #endif /* !RECLS_DOCUMENTATION_SKIP_SECTION */
00056 
00078 /* recls version */
00079 #define RECLS_VER_MAJOR     1
00080 #define RECLS_VER_MINOR     8
00081 #define RECLS_VER_REVISION  10
00082 #define RECLS_VER_1_0_1     0x01000100
00083 #define RECLS_VER_1_1_1     0x01010100
00084 #define RECLS_VER_1_2_1     0x01020100
00085 #define RECLS_VER_1_3_1     0x01030100
00086 #define RECLS_VER_1_4_1     0x01040100
00087 #define RECLS_VER_1_4_2     0x01040200
00088 #define RECLS_VER_1_5_1     0x01050100
00089 #define RECLS_VER_1_5_2     0x01050200
00090 #define RECLS_VER_1_5_3     0x01050300
00091 #define RECLS_VER_1_6_1     0x01060100
00092 #define RECLS_VER_1_6_2     0x01060200
00093 #define RECLS_VER_1_6_3     0x01060300
00094 #define RECLS_VER_1_6_4     0x01060400
00095 #define RECLS_VER_1_6_5     0x01060500
00096 #define RECLS_VER_1_7_1     0x01070100
00097 #define RECLS_VER_1_7_2     0x01070200
00098 #define RECLS_VER_1_8_1     0x01080100
00099 #define RECLS_VER_1_8_2     0x01080200
00100 #define RECLS_VER_1_8_3     0x01080300
00101 #define RECLS_VER_1_8_4     0x01080400
00102 #define RECLS_VER_1_8_5     0x01080500
00103 #define RECLS_VER_1_8_6     0x01080600
00104 #define RECLS_VER_1_8_7     0x01080700
00105 #define RECLS_VER_1_8_8     0x01080800
00106 #define RECLS_VER_1_8_9     0x01080900
00107 #define RECLS_VER_1_8_10    0x01080a00
00108 #define RECLS_VER           RECLS_VER_1_8_10
00109 
00110 /* /////////////////////////////////////////////////////////////////////////////
00111  * Strictness
00112  */
00113 
00114 #ifndef RECLS_NO_STRICT
00115 # define RECLS_STRICT
00116 #endif /* !RECLS_NO_STRICT */
00117 
00118 /* /////////////////////////////////////////////////////////////////////////////
00119  * Includes
00120  */
00121 
00122 /* Detects C & C++ things, such as namespace support */
00123 #include <recls/internal/language.h>
00124 /* Includes platform-specific headers */
00125 #include <recls/internal/platform.h>
00126 /* Includes stddef.h / cstddef, and defines the recls types: recls_s/uint8/16/32/64_t */
00127 #include <recls/internal/compiler.h>
00128 /* Defines recls_filesize_t, recls_time_t */
00129 #include <recls/internal/platform_types.h>
00130 
00131 /* /////////////////////////////////////////////////////////////////////////////
00132  * Namespace
00133  */
00134 
00135 #if !defined(RECLS_NO_NAMESPACE)
00136 namespace recls
00137 {
00138 #endif /* !RECLS_NO_NAMESPACE */
00139 
00140 #if !defined(RECLS_NO_NAMESPACE)
00141 #  define RECLS_QUAL(x)                 ::recls::x
00142 #else
00143 # define RECLS_QUAL(x)                  x
00144 #endif /* !RECLS_NO_NAMESPACE */
00145 
00146 /* /////////////////////////////////////////////////////////////////////////////
00147  * Constants and definitions
00148  */
00149 
00156 #if defined(RECLS_DOCUMENTATION_SKIP_SECTION)
00157 # define RECLS_ROOT_NAME_LEN            (1) or (3)
00158 #elif defined(RECLS_PLATFORM_IS_WIN32)
00159 # define RECLS_ROOT_NAME_LEN            (3)
00160 #elif defined(RECLS_PLATFORM_IS_UNIX)
00161 # define RECLS_ROOT_NAME_LEN            (1)
00162 #elif defined(RECLS_OVERRIDE_PLATFORM)
00163   /* Assume that the appropriate inclusions are made */
00164 #else
00165 # error Platform not recognised
00166 #endif /* platform */
00167 
00168 /* /////////////////////////////////////////////////////////////////////////////
00169  * Function specifications
00170  */
00171 
00176 #define RECLS_FNDECL(rt)    RECLS_LINKAGE_C rt RECLS_CALLCONV_DEFAULT
00177 
00178 /* /////////////////////////////////////////////////////////////////////////////
00179  * Typedefs
00180  */
00181 
00182 /* recls_rc_t */
00183 #ifdef __cplusplus
00184 
00189 typedef recls_sint32_t                      recls_rc_t;
00190 
00195 const recls_rc_t                            RECLS_RC_OK(0);
00200 const recls_rc_t                            RECLS_RC_FAIL(-1);
00201 
00206 inline bool RECLS_FAILED(recls_rc_t const &rc)
00207 {
00208     return rc < 0;
00209 }
00210 
00215 inline bool RECLS_SUCCEEDED(recls_rc_t const &rc)
00216 {
00217     return !RECLS_FAILED(rc);
00218 }
00219 
00220 #else /* ? __cplusplus */
00221 
00226 typedef recls_sint32_t                      recls_rc_t;
00227 
00232 # define RECLS_RC_OK                        (0)
00233 
00237 # define RECLS_RC_FAIL                      (-1)
00238 
00243 # define RECLS_FAILED(rc)                   ((rc) < 0)
00244 
00248 # define RECLS_SUCCEEDED(rc)                (!RECLS_FAILED(rc))
00249 
00250 #endif /* __cplusplus */
00251 
00252 /* hrecls_t */
00253 #if !defined(RECLS_DOCUMENTATION_SKIP_SECTION) && \
00254     defined(RECLS_COMPILER_IS_BORLAND) && \
00255     __BORLANDC__ < 0x0560
00256 struct hrecls_t_
00257 {
00258     int dummy;
00259 };
00260 #else /* ? compiler */
00261 struct hrecls_t_;
00262 #endif /* compiler */
00263 
00268 typedef struct hrecls_t_ const *            hrecls_t;
00269 
00270 /* /////////////////////////////////////////////////////////////////////////////
00271  * Namespace
00272  */
00273 
00274 #if !defined(RECLS_NO_NAMESPACE)
00275 } /* namespace recls */
00276 #endif /* !RECLS_NO_NAMESPACE */
00277 
00278 /* /////////////////////////////////////////////////////////////////////////////
00279  * Includes
00280  */
00281 
00282 /* Defines result codes */
00283 #include <recls/internal/retcodes.h>
00284 
00285 /* /////////////////////////////////////////////////////////////////////////////
00286  * Namespace
00287  */
00288 
00289 #if !defined(RECLS_NO_NAMESPACE)
00290 namespace recls
00291 {
00292 #endif /* !RECLS_NO_NAMESPACE */
00293 
00294 /* /////////////////////////////////////////////////////////////////////////////
00295  * Enumerations
00296  */
00297 
00305 enum RECLS_FLAG
00306 {
00307         RECLS_F_FILES                       =   0x00000001  
00308     ,   RECLS_F_DIRECTORIES                 =   0x00000002  
00309     ,   RECLS_F_LINKS                       =   0x00000004  
00310     ,   RECLS_F_DEVICES                     =   0x00000008  
00311     ,   RECLS_F_TYPEMASK                    =   0x00000FFF
00312     ,   RECLS_F_DIR_PROGRESS                =   0x00001000  
00313     ,   RECLS_F_RECURSIVE                   =   0x00010000  
00314     ,   RECLS_F_NO_FOLLOW_LINKS             =   0x00020000  
00315     ,   RECLS_F_DIRECTORY_PARTS             =   0x00040000  
00316     ,   RECLS_F_DETAILS_LATER               =   0x00080000  
00317     ,   RECLS_F_PASSIVE_FTP                 =   0x00100000  
00318     ,   RECLS_F_MARK_DIRS                   =   0x00200000  
00319     ,   RECLS_F_ALLOW_REPARSE_DIRS          =   0x00400000  
00320 #if 0
00321     ,   RECLS_F_CALC_CHECKSUM               =   0x00800000
00322 #endif /* 0 */
00323     ,   RECLS_F_CALLBACKS_STDCALL_ON_WIN32  =   0x01000000  
00324     ,   RECLS_F_USE_TILDE_ON_NO_SEARCHROOT  =   0x04000000  
00325 #if 0
00326     ,   RECLS_F_DIR_SIZE_IS_NUM_FILES       =   0x02000000  
00327 #endif /* 0 */
00328     ,   RECLS_F_IGNORE_HIDDEN_ENTRIES_ON_WIN32   =   0x08000000  
00330 #if !defined(FILES)
00331     ,   FILES = RECLS_F_FILES 
00332 #endif /* !FILES */
00333 #if !defined(DIRECTORIES)
00334     ,   DIRECTORIES = RECLS_F_DIRECTORIES 
00335 #endif /* !DIRECTORIES */
00336 #if !defined(LINKS)
00337     ,   LINKS = RECLS_F_LINKS 
00338 #endif /* !LINKS */
00339 #if !defined(DEVICES)
00340     ,   DEVICES = RECLS_F_DEVICES 
00341 #endif /* !DEVICES */
00342 #if !defined(TYPEMASK)
00343     ,   TYPEMASK = RECLS_F_TYPEMASK 
00344 #endif /* !TYPEMASK */
00345 #if !defined(DIR_PROGRESS)
00346     ,   DIR_PROGRESS = RECLS_F_DIR_PROGRESS 
00347 #endif /* !DIR_PROGRESS */
00348 #if !defined(RECURSIVE)
00349     ,   RECURSIVE = RECLS_F_RECURSIVE 
00350 #endif /* !RECURSIVE */
00351 #if !defined(NO_FOLLOW_LINKS)
00352     ,   NO_FOLLOW_LINKS = RECLS_F_NO_FOLLOW_LINKS 
00353 #endif /* !NO_FOLLOW_LINKS */
00354 #if !defined(DIRECTORY_PARTS)
00355     ,   DIRECTORY_PARTS = RECLS_F_DIRECTORY_PARTS 
00356 #endif /* !DIRECTORY_PARTS */
00357 #if !defined(DETAILS_LATER)
00358     ,   DETAILS_LATER = RECLS_F_DETAILS_LATER 
00359 #endif /* !DETAILS_LATER */
00360 #if !defined(PASSIVE_FTP)
00361     ,   PASSIVE_FTP = RECLS_F_PASSIVE_FTP 
00362 #endif /* !PASSIVE_FTP */
00363 #if !defined(MARK_DIRS)
00364     ,   MARK_DIRS = RECLS_F_MARK_DIRS 
00365 #endif /* !MARK_DIRS */
00366 #if !defined(ALLOW_REPARSE_DIRS)
00367     ,   ALLOW_REPARSE_DIRS = RECLS_F_ALLOW_REPARSE_DIRS 
00368 #endif /* !ALLOW_REPARSE_DIRS */
00369 #if 0
00370 #if !defined(CALC_CHECKSUM)
00371     ,   CALC_CHECKSUM = RECLS_F_CALC_CHECKSUM 
00372 #endif /* !CALC_CHECKSUM */
00373 #endif /* 0 */
00374 #if !defined(CALLBACKS_STDCALL_ON_WIN32)
00375     ,   CALLBACKS_STDCALL_ON_WIN32 = RECLS_F_CALLBACKS_STDCALL_ON_WIN32 
00376 #endif /* !CALLBACKS_STDCALL_ON_WIN32 */
00377 /*  ,   DIR_SIZE_IS_NUM_CHILDREN    =   RECLS_F_DIR_SIZE_IS_NUM_CHILDREN    */
00378 #if !defined(F_USE_TILDE_ON_NO_SEARCHROOT)
00379     ,   USE_TILDE_ON_NO_SEARCHROOT = RECLS_F_USE_TILDE_ON_NO_SEARCHROOT 
00380 #endif /* !RECLS_F_USE_TILDE_ON_NO_SEARCHROOT */
00381     ,   IGNORE_HIDDEN_ENTRIES_ON_WIN32 = RECLS_F_IGNORE_HIDDEN_ENTRIES_ON_WIN32 
00382 #if !defined(IGNORE_HIDDEN_ENTRIES_ON_WIN32)
00383 #endif /* !IGNORE_HIDDEN_ENTRIES_ON_WIN32 */
00384 #if 0
00385 #if !defined(RECLS_F_DIR_SIZE_IS_NUM_FILES)
00386     ,   DIR_SIZE_IS_NUM_FILES = RECLS_F_DIR_SIZE_IS_NUM_FILES 
00387 #endif /* !RECLS_F_DIR_SIZE_IS_NUM_FILES */
00388 #endif /* 0 */
00389 };
00390 
00399 enum RECLS_ROOTS_FLAG
00400 {
00401         RECLS_ROOTS_F_FIXED_DRIVES      =   0x0001  
00402     ,   RECLS_ROOTS_F_NETWORK_DRIVES    =   0x0002  
00403     ,   RECLS_ROOTS_F_CDROM_DRIVES      =   0x0004  
00404     ,   RECLS_ROOTS_F_REMOVABLE_DRIVES  =   0x0008  
00405     ,   RECLS_ROOTS_F_RAM_DRIVES        =   0x0010  
00407 #ifdef __cplusplus
00408     ,   FixedDrives                     =   RECLS_ROOTS_F_FIXED_DRIVES      
00409     ,   NetworkDrives                   =   RECLS_ROOTS_F_NETWORK_DRIVES    
00410     ,   CDRomDrives                     =   RECLS_ROOTS_F_CDROM_DRIVES      
00411     ,   RemovableDrives                 =   RECLS_ROOTS_F_REMOVABLE_DRIVES  
00412     ,   RamDrives                       =   RECLS_ROOTS_F_RAM_DRIVES        
00413 #endif /* __cplusplus */
00414 
00415 #ifndef RECLS_DOCUMENTATION_SKIP_SECTION
00416     ,   RECLS_F_FIXED_DRIVES            =   RECLS_ROOTS_F_FIXED_DRIVES
00417     ,   RECLS_F_NETWORK_DRIVES          =   RECLS_ROOTS_F_NETWORK_DRIVES
00418     ,   RECLS_F_CDROM_DRIVES            =   RECLS_ROOTS_F_CDROM_DRIVES
00419     ,   RECLS_F_REMOVABLE_DRIVES        =   RECLS_ROOTS_F_REMOVABLE_DRIVES
00420     ,   RECLS_F_RAM_DRIVES              =   RECLS_ROOTS_F_RAM_DRIVES
00421 #endif /* !RECLS_DOCUMENTATION_SKIP_SECTION */
00422 };
00423 
00424 #if !defined(__cplusplus) && \
00425     !defined(RECLS_DOCUMENTATION_SKIP_SECTION)
00426 typedef enum RECLS_FLAG         RECLS_FLAG;
00427 typedef enum RECLS_ROOTS_FLAG   RECLS_ROOTS_FLAG;
00428 #endif /* !__cplusplus && !RECLS_DOCUMENTATION_SKIP_SECTION */
00429 
00430 /* /////////////////////////////////////////////////////////////////////////////
00431  * Typedefs
00432  */
00433 
00434 /* #if defined(RECLS_PLATFORM_IS_WIN32)
00435 # define RECLS_ROOT_NAME_LEN            (3)
00436 #elif defined(RECLS_PLATFORM_IS_UNIX)
00437  */
00438 #ifndef RECLS_COMPILER_IS_CH
00439 
00443 struct recls_root_t
00444 {
00452     recls_char_t    name[1 + RECLS_ROOT_NAME_LEN];
00453 };
00454 
00455 # ifdef __cplusplus
00456 typedef recls_root_t                    root_t;
00457 # else /* ? __cplusplus */
00458 typedef struct recls_root_t             recls_root_t;
00459 # endif /* __cplusplus */
00460 #endif /* !RECLS_COMPILER_IS_CH */
00461 
00462 #ifndef RECLS_COMPILER_IS_CH
00463 struct recls_fileinfo_t;
00464 #endif /* !RECLS_COMPILER_IS_CH */
00465 
00470 typedef struct recls_fileinfo_t const   *recls_info_t;
00471 
00476 typedef void                            *recls_process_fn_param_t;
00477 
00489 typedef int (RECLS_CALLCONV_DEFAULT *hrecls_process_fn_t)(  recls_info_t                hEntry
00490                                                         ,   recls_process_fn_param_t    param);
00491 
00505 typedef int (RECLS_CALLCONV_DEFAULT *hrecls_progress_fn_t)( recls_char_t const          *dir
00506                                                         ,   size_t                      dirLen
00507                                                         ,   recls_process_fn_param_t    param
00508                                                         ,   void                        *reserved0
00509                                                         ,   recls_uint32_t              reserved1);
00510 
00511 /* /////////////////////////////////////////////////////////////////////////////
00512  * Namespace typedefs
00513  */
00514 
00515 #if !defined(RECLS_NO_NAMESPACE)
00516 typedef recls_info_t                info_t;
00517 typedef recls_process_fn_param_t    process_fn_param_t;
00518 #endif /* !RECLS_NO_NAMESPACE */
00519 
00520 /* /////////////////////////////////////////////////////////////////////////////
00521  * Functions
00522  */
00523 
00524 /***************************************
00525  * File system
00526  */
00527 
00534 #ifndef RECLS_COMPILER_IS_CH
00535 
00561 RECLS_FNDECL(size_t)                Recls_GetRoots(     recls_root_t    *roots
00562                                                     ,   size_t          cRoots);
00563 
00576 RECLS_FNDECL(size_t)                Recls_GetSelectedRoots( recls_root_t    *roots
00577                                                         ,   size_t          cRoots
00578                                                         ,   recls_uint32_t  flags);
00579 
00580 #endif /* !RECLS_COMPILER_IS_CH */
00581 
00582 #if 0
00583 /* New Recls1 API. */
00584 RECLS_FNDECL(size_t)    Recls1_FileSystem_GetRoots(     recls_root_t    *roots
00585                                                     ,   size_t          cRoots
00586                                                     ,   recls_uint32_t  flags);
00587 #endif /* 0 */
00588 
00589 
00604 RECLS_FNDECL(recls_char_t const*)   Recls_GetPathNameSeparator(void);
00605 
00606 #if 0
00607 /* New Recls1 API. */
00608 RECLS_FNDECL(recls_char_t const*)   Recls1_FileSystem_GetPathNameSeparator(void);
00609 #endif /* 0 */
00610 
00625 RECLS_FNDECL(recls_char_t const*)   Recls_GetPathSeparator(void);
00626 
00627 #if 0
00628 /* New Recls1 API. */
00629 RECLS_FNDECL(recls_char_t const*)   Recls1_FileSystem_GetPathSeparator(void);
00630 #endif /* 0 */
00631 
00646 RECLS_FNDECL(recls_char_t const*)   Recls_GetWildcardsAll(void);
00647 
00648 #if 0
00649 /* New Recls1 API. */
00650 RECLS_FNDECL(recls_char_t const*)   Recls1_FileSystem_GetWildcardsAll(void);
00651 #endif /* 0 */
00652 
00655 /***************************************
00656  * Search control
00657  */
00658 
00684 RECLS_FNDECL(recls_rc_t) Recls_Search(          recls_char_t const          *searchRoot
00685                                     ,           recls_char_t const          *pattern
00686                                     ,           recls_uint32_t              flags
00687                                     ,           hrecls_t                    *phSrch);
00688 
00705 RECLS_FNDECL(recls_rc_t) Recls_SearchFeedback(  recls_char_t const          *searchRoot
00706                                     ,           recls_char_t const          *pattern
00707                                     ,           recls_uint32_t              flags
00708                                     ,           hrecls_progress_fn_t        pfn
00709                                     ,           recls_process_fn_param_t    param
00710                                     ,           hrecls_t                    *phSrch);
00711 
00712 
00713 #if 0
00714 /* New Recls1 API. */
00715 RECLS_FNDECL(recls_rc_t) Recls1_FileSystem_StartSearch( recls_char_t const          *searchRoot
00716                                                     ,   recls_char_t const          *pattern
00717                                                     ,   recls_uint32_t              flags
00718                                                     ,   Recls1_progress_fn_t        pfnProgress
00719                                                     ,   Recls1_process_fn_param_t   paramProgress
00720                                                     ,   Recls1_filter_fn_t          pfnFilter
00721                                                     ,   Recls1_filter_fn_param_t    paramFilter
00722                                                     ,   hrecls_t                    *phSrch);
00723 #endif /* 0 */
00724 
00740 RECLS_FNDECL(recls_rc_t) Recls_SearchProcess(   recls_char_t const          *searchRoot
00741                                             ,   recls_char_t const          *pattern
00742                                             ,   recls_uint32_t              flags
00743                                             ,   hrecls_process_fn_t         pfn
00744                                             ,   recls_process_fn_param_t    param);
00745 
00752 RECLS_FNDECL(void) Recls_SearchClose(           hrecls_t                    hSrch);
00753 
00754 
00755 #if 0
00756 /* New Recls1 API. */
00757 RECLS_FNDECL(recls_rc_t) Recls1_FileSystem_CloseSearch(hrecls_t             hSrch);
00758 #endif /* 0 */
00759 
00760 
00774 RECLS_FNDECL(recls_rc_t) Recls_Stat(            recls_char_t const          *path
00775                                             ,   recls_uint32_t              flags
00776                                             ,   recls_info_t                *phEntry);
00777 
00778 #if 0
00779 /* New Recls1 API. */
00780 RECLS_FNDECL(recls_rc_t) Recls1_FileSystem_Stat(Recls1_char_t const         *path
00781                                             ,   Recls1_uint32_t             flags
00782                                             ,   Recls1_entry_t              *pentry);
00783 #endif /* 0 */
00784 
00785 
00788 /***************************************
00789  * Search enumeration
00790  */
00791 
00809 RECLS_FNDECL(recls_rc_t) Recls_GetNext(         hrecls_t                    hSrch);
00810 
00811 #if 0
00812 /* New Recls1 API. */
00813 RECLS_FNDECL(recls_rc_t) Recls1_Search_Next(    hrecls_t                    hSrch);
00814 #endif /* 0 */
00815 
00816 
00829 RECLS_FNDECL(recls_rc_t) Recls_GetDetails(      hrecls_t                    hSrch
00830                                             ,   recls_info_t                *phEntry);
00831 
00832 #if 0
00833 /* New Recls1 API. */
00834 #endif /* 0 */
00835 
00847 RECLS_FNDECL(recls_rc_t) Recls_GetNextDetails(  hrecls_t                    hSrch
00848                                             ,   recls_info_t                *phEntry);
00849 
00852 /***************************************
00853  * File entry information
00854  */
00855 
00868 RECLS_FNDECL(void) Recls_CloseDetails(          recls_info_t                hEntry);
00869 
00881 RECLS_FNDECL(recls_rc_t) Recls_CopyDetails(     recls_info_t                hEntry
00882                                             ,   recls_info_t                *phEntry);
00883 
00895 RECLS_FNDECL(recls_rc_t) Recls_OutstandingDetails(hrecls_t                  hSrch
00896                                             ,   recls_uint32_t              *count);
00897 
00900 /***************************************
00901  * Error handling
00902  */
00903 
00918 RECLS_FNDECL(recls_rc_t) Recls_GetLastError(    hrecls_t                    hSrch);
00919 
00930 RECLS_FNDECL(size_t) Recls_GetErrorString(      /* [in] */ recls_rc_t       rc
00931                                     ,           /* [in] */ recls_char_t     *buffer
00932                                     ,           /* [in] */ size_t           cchBuffer);
00933 
00944 RECLS_FNDECL(size_t) Recls_GetLastErrorString(  /* [in] */ hrecls_t         hSrch
00945                                         ,       /* [in] */ recls_char_t     *buffer
00946                                         ,       /* [in] */ size_t           cchBuffer);
00947 
00950 /***************************************
00951  * Property elicitation
00952  */
00953 
00970 RECLS_FNDECL(size_t) Recls_GetPathProperty(     recls_info_t                hEntry
00971                                         ,       recls_char_t                *buffer
00972                                         ,       size_t                      cchBuffer);
00973 
00984 RECLS_FNDECL(size_t) Recls_GetSearchRelativePathProperty(   recls_info_t    hEntry
00985                                                     ,       recls_char_t    *buffer
00986                                                     ,       size_t          cchBuffer);
00987 
00998 RECLS_FNDECL(size_t) Recls_GetDirectoryProperty(recls_info_t                hEntry
00999                                             ,   recls_char_t                *buffer
01000                                             ,   size_t                      cchBuffer);
01001 
01014 RECLS_FNDECL(size_t) Recls_GetDirectoryPathProperty(    recls_info_t        hEntry
01015                                                     ,   recls_char_t        *buffer
01016                                                     ,   size_t              cchBuffer);
01017 
01028 RECLS_FNDECL(size_t) Recls_GetSearchDirectoryProperty(  recls_info_t        hEntry
01029                                                     ,   recls_char_t        *buffer
01030                                                     ,   size_t              cchBuffer);
01031 
01044 RECLS_FNDECL(size_t) Recls_GetUNCDriveProperty(         recls_info_t        hEntry
01045                                                     ,   recls_char_t        *buffer
01046                                                     ,   size_t              cchBuffer);
01047 
01058 RECLS_FNDECL(size_t) Recls_GetFileProperty(     recls_info_t                hEntry
01059                                         ,       recls_char_t                *buffer
01060                                         ,       size_t                      cchBuffer);
01061 
01074 RECLS_FNDECL(size_t) Recls_GetShortFileProperty(recls_info_t                hEntry
01075                                             ,   recls_char_t                *buffer
01076                                             ,   size_t                      cchBuffer);
01077 
01088 RECLS_FNDECL(size_t) Recls_GetFileNameProperty( recls_info_t                hEntry
01089                                             ,   recls_char_t                *buffer
01090                                             ,   size_t                      cchBuffer);
01091 
01102 RECLS_FNDECL(size_t) Recls_GetFileExtProperty(  recls_info_t                hEntry
01103                                             ,   recls_char_t                *buffer
01104                                             ,   size_t                      cchBuffer);
01105 
01119 RECLS_FNDECL(size_t) Recls_GetDirectoryPartProperty(recls_info_t            hEntry
01120                                             ,   int                         part
01121                                             ,   recls_char_t                *buffer
01122                                             ,   size_t                      cchBuffer);
01123 
01124 
01135 RECLS_FNDECL(recls_bool_t) Recls_IsFileReadOnly(recls_info_t                hEntry);
01136 
01147 RECLS_FNDECL(recls_bool_t) Recls_IsFileDirectory(recls_info_t               hEntry);
01148 
01159 RECLS_FNDECL(recls_bool_t) Recls_IsFileLink(    recls_info_t                hEntry);
01160 
01171 RECLS_FNDECL(recls_bool_t) Recls_DoesEntryExist(recls_info_t                hEntry);
01172 
01183 RECLS_FNDECL(recls_bool_t) Recls_IsFileUNC(     recls_info_t                hEntry);
01184 
01194 RECLS_FNDECL(void)         Recls_GetSizeProperty(   recls_info_t            hEntry
01195                                                 ,   recls_filesize_t        *size);
01196 
01201 RECLS_FNDECL(recls_time_t) Recls_GetCreationTime(recls_info_t               hEntry);
01202 
01207 RECLS_FNDECL(recls_time_t) Recls_GetModificationTime(recls_info_t           hEntry);
01208 
01213 RECLS_FNDECL(recls_time_t) Recls_GetLastAccessTime(recls_info_t             hEntry);
01214 
01219 RECLS_FNDECL(recls_time_t) Recls_GetLastStatusChangeTime(recls_info_t       hEntry);
01220 
01221 #if 0
01222 
01229 RECLS_FNDECL(recls_uint32_t) Recls_GetChecksum(         recls_info_t        hEntry);
01230 #endif /* 0 */
01231 
01234 /***************************************
01235  * Extended API functions
01236  */
01237 
01250 RECLS_FNDECL(recls_bool_t) Recls_IsDirectoryEmpty(recls_char_t const        *dir);
01251 
01258 RECLS_FNDECL(recls_bool_t) Recls_IsDirectoryEntryEmpty(recls_info_t         hEntry);
01259 
01267 RECLS_FNDECL(recls_filesize_t) Recls_CalcDirectorySize(recls_char_t const   *dir);
01268 
01276 RECLS_FNDECL(recls_filesize_t) Recls_CalcDirectoryEntrySize(recls_info_t    hEntry);
01277 
01278 
01291 RECLS_FNDECL(recls_filesize_t) Recls_CalcDirectorySizeFeedback( recls_char_t const          *dir
01292                                                             ,   recls_uint32_t              flags
01293                                                             ,   hrecls_progress_fn_t        pfn
01294                                                             ,   recls_process_fn_param_t    param);
01295 
01298 /***************************************
01299  * Path functions
01300  */
01301 
01323 RECLS_FNDECL(size_t) Recls_CombinePaths(        recls_char_t const          *path1
01324                                             ,   recls_char_t const          *path2
01325                                             ,   recls_char_t                *result
01326                                             ,   size_t                      cchResult);
01327 
01339 RECLS_FNDECL(size_t) Recls_DeriveRelativePath(  recls_char_t const          *origin
01340                                             ,   recls_char_t const          *target
01341                                             ,   recls_char_t                *result
01342                                             ,   size_t                      cchResult);
01343 
01354 RECLS_FNDECL(size_t) Recls_SqueezePath(         recls_char_t const          *path
01355                                             ,   recls_char_t                *result
01356                                             ,   size_t                      cchResult);
01357 
01360 /* /////////////////////////////////////////////////////////////////////////////
01361  * Namespace
01362  */
01363 
01364 #if !defined(RECLS_NO_NAMESPACE)
01365 } /* namespace recls */
01366 #endif /* !RECLS_NO_NAMESPACE */
01367 
01368 #ifdef __cplusplus
01369 
01370 # ifndef _STLSOFT_NO_NAMESPACE
01371 namespace stlsoft
01372 {
01373 # endif /* !_STLSOFT_NO_NAMESPACE */
01374 
01375 # if defined(RECLS_NO_NAMESPACE)
01376 inline recls_char_t const *c_str_ptr(recls_root_t const &root)
01377 # else /* ? RECLS_NO_NAMESPACE */
01378 inline ::recls::recls_char_t const *c_str_ptr(::recls::recls_root_t const &root)
01379 # endif /* RECLS_NO_NAMESPACE */
01380 {
01381     return root.name;
01382 }
01383 
01384 #ifdef RECLS_CHAR_TYPE_IS_CHAR
01385 inline ::recls::recls_char_t const *c_str_ptr_a(::recls::recls_root_t const &root)
01386 {
01387     return c_str_ptr(root);
01388 }
01389 #endif /* RECLS_CHAR_TYPE_IS_CHAR */
01390 
01391 #ifdef RECLS_CHAR_TYPE_IS_WCHAR
01392 inline ::recls::recls_char_t const *c_str_ptr_w(::recls::recls_root_t const &root)
01393 {
01394     return c_str_ptr(root);
01395 }
01396 #endif /* RECLS_CHAR_TYPE_IS_WCHAR */
01397 
01398 
01399 # ifndef _STLSOFT_NO_NAMESPACE
01400 } /* namespace stlsoft */
01401 # endif /* !_STLSOFT_NO_NAMESPACE */
01402 
01403 #endif /* __cplusplus */
01404 
01405 /* /////////////////////////////////////////////////////////////////////////////
01406  * Platform-specific includes
01407  */
01408 
01418 #ifdef RECLS_PLATFORM_API_WIN32
01419 # undef RECLS_PLATFORM_API_WIN32
01420 #endif /* RECLS_PLATFORM_API_WIN32 */
01421 
01422 #ifdef RECLS_PLATFORM_API_UNIX
01423 # undef RECLS_PLATFORM_API_UNIX
01424 #endif /* RECLS_PLATFORM_API_UNIX */
01425 
01426 #if !defined(RECLS_PURE_API)
01427 # if defined(RECLS_PLATFORM_IS_WIN32)
01428 #  include <recls/win32.h>
01429 #  define RECLS_PLATFORM_API_WIN32
01430 # elif defined(RECLS_PLATFORM_IS_UNIX)
01431 #  include <recls/unix.h>
01432 #  define RECLS_PLATFORM_API_UNIX
01433 # else
01434 #  error Platform not recognised
01435 # endif /* platform */
01436 #endif /* !RECLS_PURE_API */
01437 
01438 /* /////////////////////////////////////////////////////////////////////////////
01439  * Inclusion
01440  */
01441 
01442 #ifdef RECLS_CF_PRAGMA_ONCE_SUPPORT
01443 # pragma once
01444 #endif /* RECLS_CF_PRAGMA_ONCE_SUPPORT */
01445 
01446 /* /////////////////////////////////////////////////////////////////////////////
01447  * Documentation
01448  */
01449 
01450 #ifdef RECLS_DOCUMENTATION_SKIP_SECTION
01451 # include <recls/internal/doc/includes.h>
01452 #endif /* RECLS_DOCUMENTATION_SKIP_SECTION */
01453 
01454 /* ////////////////////////////////////////////////////////////////////////// */
01455 
01456 #endif /* !RECLS_INCL_RECLS_H_RECLS */
01457 
01458 /* ////////////////////////////////////////////////////////////////////////// */

recls Library documentation © Synesis Software Pty Ltd, 2001-2006