Listing 1
static int IsDirectoryEmpty_proc( recls_info_t /* info */
, recls_process_fn_param_t /* param */)
{
return 0; // Cancel on any entry
}
recls_bool_t Recls_IsDirectoryEmpty(recls_char_t const *dir)
{
recls_rc_t rc = Recls_SearchProcess(dir, Recls_GetWildcardsAll()
, RECLS_F_TYPEMASK, IsDirectoryEmpty_proc, 0);
return RECLS_RC_SEARCH_CANCELLED != rc;
}
recls_bool_t Recls_IsDirectoryEntryEmpty(recls_info_t hEntry)
{
recls_assert(NULL != hEntry);
recls_assert(Recls_IsFileDirectory(hEntry));
return Recls_IsDirectoryEmpty(hEntry->path.begin);
}