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

FileSearch Class Reference
[recls.c++]

#include <recls/cpp/filesearch.hpp>

Inheritance diagram for FileSearch:

Search List of all members.

Detailed Description

This class provides functionality for executing a file search.
Examples:

example_cpp_1.cpp, and example_cpp_2.cpp.


Public Member Functions

Operations
recls_rc_t GetNext ()
 Advances the search to the next position.
Attributes
recls_bool_t HasMoreElements () const
 Returns non-zero if there is more data available.
FileEntry GetCurrentEntry () const
 Returns the current entry.
recls_rc_t GetLastError () const
 Returns the last error status code for this search object.
recls_uint32_t GetNumOutstandingDetails () const
 Returns the number of outstanding file-entry blocks associated with this search object.

Static Public Member Functions

Operations
template<typename S>
static FileEntry Stat (S const &path)
 Retrieves the information for the given path.


Constructor & Destructor Documentation

FileSearch ( char_type const *  rootDir,
char_type const *  pattern,
recls_uint32_t  flags 
) [inline]

Creates a search for the items identified by pattern in the directory rootDir, according to the given flags.

Parameters:
rootDir The starting directory for the search. If NULL, or the empty string, uses the current directory
pattern The search pattern, e.g. "*.h". If NULL, or the empty string, uses "*.*" (Win32) or "*" (UNIX)
flags A combination of enumerants from the RECLS_FLAG enumeration

~FileSearch (  )  [inline]

Destructor.

FileSearch ( char_type const *  rootDir,
char_type const *  pattern,
recls_uint32_t  flags 
) [inline]

Creates a search for the items identified by pattern in the directory rootDir, according to the given flags.

Parameters:
rootDir The starting directory for the search. If NULL, or the empty string, uses the current directory
pattern The search pattern, e.g. "*.h". If NULL, or the empty string, uses "*.*" (Win32) or "*" (UNIX)
flags A combination of enumerants from the RECLS_FLAG enumeration

~FileSearch (  )  [inline]

Destructor.


Member Function Documentation

static FileEntry Stat ( S const &  path  )  [inline, static]

Retrieves the information for the given path.

Parameters:
path Absolute or relative path of the file system entry whose information is to be retrieved.
flags Flags to moderate the search. Only the type flags (flags & RECLS_F_TYPEMASK) and RECLS_F_DIRECTORY_PARTS are recognised
Returns:
A valid instance if the path/flags exists, or a 'null' instance. (A null instance e evaluates !e to be true).
Examples:
example_cpp_2.cpp, and example_cpp_3.cpp.

recls_rc_t GetNext (  )  [inline, inherited]

Advances the search to the next position.

Examples:
example_cpp_1.cpp, and example_cpp_2.cpp.

recls_bool_t HasMoreElements (  )  const [inline, inherited]

Returns non-zero if there is more data available.

Examples:
example_cpp_1.cpp, and example_cpp_2.cpp.

FileEntry GetCurrentEntry (  )  const [inline, inherited]

Returns the current entry.

Note:
The behaviour is undefined when the HasMoreElements() returns zero
Examples:
example_cpp_1.cpp, and example_cpp_2.cpp.

recls_rc_t GetLastError (  )  const [inline, inherited]

Returns the last error status code for this search object.

recls_uint32_t GetNumOutstandingDetails (  )  const [inline, inherited]

Returns the number of outstanding file-entry blocks associated with this search object.


The documentation for this class was generated from the following file:

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