acl/lib_acl/include/stdlib/acl_scan_dir.h

206 lines
6.7 KiB
C
Raw Normal View History

2014-11-19 00:25:21 +08:00
#ifndef ACL_SCAN_DIR_INCLUDE_H
#define ACL_SCAN_DIR_INCLUDE_H
#include <sys/stat.h>
#ifdef __cplusplus
extern "C" {
#endif
#include "acl_define.h"
/**
* Ŀ¼ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͷ<EFBFBD><EFBFBD><EFBFBD>
*/
typedef struct ACL_SCAN_DIR ACL_SCAN_DIR;
/**
* Ŀ¼<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>õĻص<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͷ<EFBFBD><EFBFBD><EFBFBD>
* @param scan {ACL_SCAN_DIR*} Ŀ¼ɨ<EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
* @param ctx {void*} <EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
*/
typedef int (*ACL_SCAN_DIR_FN)(ACL_SCAN_DIR *scan, void *ctx);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɨ<EFBFBD><EFBFBD>·<EFBFBD><EFBFBD>, Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> acl_scan_dir <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param path {const char*} Ҫ<EFBFBD>򿪵<EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param recursive {int} <EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>ݹ<EFBFBD>ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼
* @return {ACL_SCAN_DIR*} NULL: Err; != NULL, OK
*/
ACL_API ACL_SCAN_DIR *acl_scan_dir_open(const char *path, int recursive);
/**
* <EFBFBD>ر<EFBFBD>ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param scan {ACL_SCAN_DIR*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
*/
ACL_API void acl_scan_dir_close(ACL_SCAN_DIR *scan);
/**
* <EFBFBD><EFBFBD>Ŀ¼ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD>صı<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0
* @param scan {ACL_SCAN_DIR*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
*/
ACL_API void acl_scan_dir_reset(ACL_SCAN_DIR *scan);
/**
* ͨ<EFBFBD><EFBFBD><EFBFBD>˽ӿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ļص<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ<EFBFBD>־
* Ϊ ACL_SCAN_CTL_END ʱ<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD>Ʋ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param scan {ACL_SCAN_DIR*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
* @param name {int} <EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ACL_SCAN_CTL_XXX
*/
ACL_API void acl_scan_dir_ctl(ACL_SCAN_DIR *scan, int name, ...);
#define ACL_SCAN_CTL_END 0 /**< <20><><EFBFBD>ƽ<EFBFBD><C6BD><EFBFBD><EFBFBD><EFBFBD>־ */
#define ACL_SCAN_CTL_FN 1 /**< <20><><EFBFBD><EFBFBD> ACL_SCAN_DIR_FN <20><>־ */
#define ACL_SCAN_CTL_CTX 2 /**< <20><><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD> */
/**
* <EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>ǰ״̬<EFBFBD>µ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> acl_scan_dir_open
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>ij<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD>)
* @param scan {ACL_SCAN_DIR*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
* @return {const char*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD>, == NULL: err; != NULL, OK
*/
ACL_API const char *acl_scan_dir_path(ACL_SCAN_DIR *scan);
/**
* <EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD>ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɨ<EFBFBD><EFBFBD><EFBFBD>Ķ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>򷵻<EFBFBD> "\0"
* @param scan {ACL_SCAN_DIR*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
* @return {const char*} <EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>
*/
ACL_API const char *acl_scan_dir_file(ACL_SCAN_DIR *scan);
/**
* <EFBFBD><EFBFBD>ǰ<EFBFBD>Ѿ<EFBFBD>ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼<EFBFBD>ܸ<EFBFBD><EFBFBD><EFBFBD>
* @param scan {ACL_SCAN_DIR*}
* @return {int} Ŀ¼<EFBFBD>ܸ<EFBFBD><EFBFBD><EFBFBD>, < 0 <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
ACL_API int acl_scan_dir_ndirs(ACL_SCAN_DIR *scan);
/**
* <EFBFBD><EFBFBD>ǰ<EFBFBD>Ѿ<EFBFBD>ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD>ܸ<EFBFBD><EFBFBD><EFBFBD>
* @param scan {ACL_SCAN_DIR*}
* @return {int} <EFBFBD>ļ<EFBFBD><EFBFBD>ܸ<EFBFBD><EFBFBD><EFBFBD>, < 0 <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
ACL_API int acl_scan_dir_nfiles(ACL_SCAN_DIR *scan);
/**
* <EFBFBD><EFBFBD>ǰ<EFBFBD>Ѿ<EFBFBD>ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>С<EFBFBD>ܺ<EFBFBD>
* @param scan {ACL_SCAN_DIR*}
* @return {acl_int64} -1: Error; >= 0: Ok
*/
ACL_API acl_int64 acl_scan_dir_nsize(ACL_SCAN_DIR *scan);
/**
* ȡ<EFBFBD>õ<EFBFBD>ǰ<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>Ŀ¼<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڱ<EFBFBD>׼<EFBFBD><EFBFBD> stat() <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param scan {ACL_SCAN_DIR*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
* @param sbuf: {struct acl_stat*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
* @return {int} 0: Ok, -1: Error
*/
ACL_API int acl_scan_stat(ACL_SCAN_DIR *scan, struct acl_stat *sbuf);
/**
* Ŀ¼<EFBFBD>Ƿ<EFBFBD>ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param scan {ACL_SCAN_DIR*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
* @return {int} 0: <EFBFBD><EFBFBD>ʾδɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϣ<EFBFBD> !=0: <EFBFBD><EFBFBD>ʾɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
ACL_API int acl_scan_dir_end(ACL_SCAN_DIR *scan);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD>ѹջ
* @param scan {ACL_SCAN_DIR*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
* @param path {const char*} <EFBFBD><EFBFBD>Ҫѹջ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD>
* @return {int} 0: OK; -1: Err
*/
ACL_API int acl_scan_dir_push(ACL_SCAN_DIR *scan, const char *path);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>·<EFBFBD><EFBFBD>
* @param scan {ACL_SCAN_DIR*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
* @return {ACL_SCAN_DIR*} <EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>ջ<EFBFBD>е<EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, == NULL: <EFBFBD><EFBFBD><EFBFBD><EFBFBD>; != NULL, OK
*/
ACL_API ACL_SCAN_DIR *acl_scan_dir_pop(ACL_SCAN_DIR *scan);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> scan <EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>, ע<EFBFBD><EFBFBD>ú<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݹ<EFBFBD>ɨ<EFBFBD><EFBFBD>,
* <EFBFBD><EFBFBD> acl_scan_dir_open <EFBFBD>еIJ<EFBFBD><EFBFBD><EFBFBD> recursive <EFBFBD>Ըú<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч
* 1<EFBFBD><EFBFBD> ".." <EFBFBD><EFBFBD> "." <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* 2<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD>, ·<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> acl_scan_dir_path <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param scan {ACL_SCAN_DIR*} ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ
* @return {const char*} ΪĿ¼<EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, != NULL: OK; == NULL, ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
ACL_API const char *acl_scan_dir_next(ACL_SCAN_DIR *scan);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD> acl_scan_dir_path <EFBFBD><EFBFBD><EFBFBD><EFBFBD>),
* <EFBFBD>ú<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD>֧<EFBFBD>ֵݹ<EFBFBD>ɨ<EFBFBD><EFBFBD>Ŀ¼<EFBFBD><EFBFBD><EFBFBD><EFBFBD>, acl_scan_dir_open <EFBFBD>еIJ<EFBFBD><EFBFBD><EFBFBD> recursive <EFBFBD>Ըú<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч
* @param scan {ACL_SCAN_DIR*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
* @return {const char*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>: !NULL, OK; NULL ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϣ<EFBFBD>Ӧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɨ<EFBFBD><EFBFBD>
*/
ACL_API const char *acl_scan_dir_next_file(ACL_SCAN_DIR *scan);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>Ŀ¼<EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD> acl_scan_dir_path <EFBFBD><EFBFBD><EFBFBD><EFBFBD>),
* <EFBFBD>ú<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD>֧<EFBFBD>ֵݹ<EFBFBD>ɨ<EFBFBD><EFBFBD>Ŀ¼<EFBFBD><EFBFBD><EFBFBD><EFBFBD>, acl_scan_dir_open <EFBFBD>еIJ<EFBFBD><EFBFBD><EFBFBD> recursive <EFBFBD>Ըú<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч
* @param scan {ACL_SCAN_DIR*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
* @return {const char*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼<EFBFBD><EFBFBD>: !NULL, OK; NULL ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, Ӧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɨ<EFBFBD><EFBFBD>
*/
ACL_API const char *acl_scan_dir_next_dir(ACL_SCAN_DIR *scan);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>Ŀ¼<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD> acl_scan_dir_path <EFBFBD><EFBFBD><EFBFBD><EFBFBD>),
* <EFBFBD>ú<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD>֧<EFBFBD>ֵݹ<EFBFBD>ɨ<EFBFBD><EFBFBD>Ŀ¼<EFBFBD><EFBFBD><EFBFBD><EFBFBD>, acl_scan_dir_open <EFBFBD>еIJ<EFBFBD><EFBFBD><EFBFBD> recursive <EFBFBD>Ըú<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч
* @param scan {ACL_SCAN_DIR*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
* @param is_file {int*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD>
* <EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ true <EFBFBD><EFBFBD>Ϊ<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΪĿ¼
* @return {const char*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>: !NULL, OK; NULL ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
* Ӧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɨ<EFBFBD><EFBFBD>
*/
ACL_API const char *acl_scan_dir_next_name(ACL_SCAN_DIR *scan, int *is_file);
/**
* ȡ<EFBFBD>õ<EFBFBD>ǰĿ¼<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ռ<EFBFBD><EFBFBD><EFBFBD>̿ռ<EFBFBD><EFBFBD><EFBFBD>С(<EFBFBD><EFBFBD><EFBFBD>ֽڼ<EFBFBD><EFBFBD><EFBFBD>)
* <EFBFBD>ú<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD>֧<EFBFBD>ֵݹ<EFBFBD>ɨ<EFBFBD><EFBFBD>Ŀ¼<EFBFBD><EFBFBD><EFBFBD><EFBFBD>, acl_scan_dir_open <EFBFBD>еIJ<EFBFBD><EFBFBD><EFBFBD> recursive <EFBFBD>Ըú<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч
* @param scan {ACL_SCAN_DIR*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼ʱ<EFBFBD><EFBFBD>ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param nfile {int*} ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD>ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param ndir {int*} ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD>ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @return {acl_int64} -1: Error; >= 0: Ok
*/
ACL_API acl_int64 acl_scan_dir_size2(ACL_SCAN_DIR *scan, int *nfile, int *ndir);
/**
* ȡ<EFBFBD>õ<EFBFBD>ǰĿ¼<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ռ<EFBFBD><EFBFBD><EFBFBD>̿ռ<EFBFBD><EFBFBD><EFBFBD>С(<EFBFBD><EFBFBD><EFBFBD>ֽڼ<EFBFBD><EFBFBD><EFBFBD>)
* @param pathname {const char*} Ŀ¼·<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param recursive {int} <EFBFBD>Ƿ<EFBFBD>Ҫ<EFBFBD>ݹ<EFBFBD>ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼<EFBFBD>µ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼
* @param nfile {int*} ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD>ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param ndir {int*} ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD>ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @return {acl_int64} -1: Error, >= 0: Ok
*/
ACL_API acl_int64 acl_scan_dir_size(const char *pathname, int recursive,
int *nfile, int *ndir);
/**
* ɾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>Ŀ¼
* @param nfile {int*} ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD>ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param ndir {int*} ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD>ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* <EFBFBD>ú<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD>֧<EFBFBD>ֵݹ<EFBFBD>ɨ<EFBFBD><EFBFBD>Ŀ¼<EFBFBD><EFBFBD><EFBFBD><EFBFBD>, acl_scan_dir_open <EFBFBD>еIJ<EFBFBD><EFBFBD><EFBFBD> recursive <EFBFBD>Ըú<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч
* @param scan {ACL_SCAN_DIR*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼ʱ<EFBFBD><EFBFBD>ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @return {acl_int64} >= 0: ʵ<EFBFBD><EFBFBD>ɾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼<EFBFBD><EFBFBD><EFBFBD>ijߴ<EFBFBD><EFBFBD><EFBFBD>С֮<EFBFBD><EFBFBD>(<EFBFBD>ֽ<EFBFBD>); < 0: <EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
*/
ACL_API acl_int64 acl_scan_dir_rm2(ACL_SCAN_DIR *scan, int *nfile, int *ndir);
/**
* ɾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>Ŀ¼
* @param pathname {const char*} ·<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param recursive {int} <EFBFBD>Ƿ<EFBFBD><EFBFBD>ݹ<EFBFBD>ɾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼<EFBFBD>µ<EFBFBD><EFBFBD>ļ<EFBFBD>
* @param ndir {int*} <EFBFBD><EFBFBD><EFBFBD>ò<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿգ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>̽<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *ndir <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܹ<EFBFBD>ɾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼<EFBFBD><EFBFBD>Ŀ
* @param nfile {int*} <EFBFBD><EFBFBD><EFBFBD>ò<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿգ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>̽<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *nfile <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܹ<EFBFBD>ɾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>Ŀ
* @return {acl_int64} >= 0: ʵ<EFBFBD><EFBFBD>ɾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼<EFBFBD><EFBFBD><EFBFBD>ijߴ<EFBFBD><EFBFBD><EFBFBD>С֮<EFBFBD><EFBFBD>(<EFBFBD>ֽ<EFBFBD>); < 0: <EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
*/
ACL_API acl_int64 acl_scan_dir_rm(const char *pathname, int recursive,
int *ndir, int *nfile);
#ifdef __cplusplus
}
#endif
#endif