IDA SDK

- Main Page
- Header Files
- Classes
- Modules

- File List
- File Members

Classes | Functions | Macros
prodir.h File Reference

## Detailed Description

Unified interface to qfindfirst64(),qfindnext64(),qfindclose64() functions.

These are low level functions, it is better to use enumerate_files().

## Classes
struct | qffblk_t
| file statistics returned by qfind()-like functions More...
struct | qffblk64_t
| Common structure with 64-bit ff_fsize for 64-bit dir functions - see qffblk_t. More...

## Functions
idaman THREAD_SAFE int ida_export | qfindfirst64 (const char *pattern, struct qffblk64_t *blk, int attr)
| Find first file that matches the pattern. More...
idaman THREAD_SAFE int ida_export | qfindnext64 (struct qffblk64_t *blk)
| Find next file that matches the pattern. More...
idaman THREAD_SAFE void ida_export | qfindclose64 (struct qffblk64_t *blk)
| Stop the file enumeration and free internal structures. More...

## Macros
#define | __FAT__
#define | SDIRCHAR "\\"
| Path separator as a string.
#define | DIRCHAR '\\'
| Path separator.
#define | DRVCHAR ':'
| Windows drive separator.
#define | EXTCHAR '.'
| Extension character is '.' for all systems.
#define | MAXPATH 260
| Size limit of qffblk_t::ff_name.
#define | FA_RDONLY 0x01
| File cannot be opened for writing.
#define | FA_DIREC 0x10
| Directory.
#define | FA_ARCH 0x20
| File has not been backed up.
#define | MAXDRIVE _MAX_DRIVE
| Max drive name size.
#define | MAXDIR _MAX_DIR
| Max directory name size.
#define | MAXFILE _MAX_FNAME
| Max file name size.
#define | MAXEXT _MAX_EXT
| Max file extension size.

## Function Documentation

idaman THREAD_SAFE int ida_export qfindfirst64 | ( | const char * | pattern,
|  | struct qffblk64_t * | blk,
|  | int | attr
| ) |  |

Find first file that matches the pattern.

Parameters

  pattern | file name pattern, usually with * and ? wildcards
  blk | structure that will hold the answer. blk->ff_name will hold the file name, for example.
  attr | the desired file types (FA_DIREC or 0)

Returns
  0 if found a file, other values mean error

idaman THREAD_SAFE int ida_export qfindnext64 | ( | struct qffblk64_t * | blk | ) |

Find next file that matches the pattern.

Parameters

  blk | structure that holds the current state. blk->ff_name will hold the next file name upon return.

Returns
  0 if found the next file, other values mean error

idaman THREAD_SAFE void ida_export qfindclose64 | ( | struct qffblk64_t * | blk | ) |

Stop the file enumeration and free internal structures.

Note
  there is no need to call this function manually, it is called from the qffblk64_t destructor.

Parameters

  blk | file enumeration structure