# WinStd: winstd::find_file Class Reference

winstd::find_file Class Reference
Windows API

Find-file handle wrapper. More...

`#include <WinStd/Win.h>`

Inheritance diagram for winstd::find_file:

## Public Member Functions

virtual | ~find_file ()
| Closes a file search handle. More...
| __declspec (deprecated("Use FindFirstFile")) bool find(LPCTSTR lpFileName
| Searches a directory for a file or subdirectory with a name that matches a specific name (or partial name if wildcards are used). More...
| if (h !=invalid)
Public Member Functions inherited from winstd::handle< HANDLE, INVALID_HANDLE_VALUE >
| handle () noexcept
| Initializes a new class instance with the object handle set to INVAL.
| handle (handle_type h) noexcept
| Initializes a new class instance with an already available object handle. More...
| handle (handle< handle_type, INVAL > &&h) noexcept
| Move constructor. More...
handle< handle_type, INVAL > & | operator= (handle_type h) noexcept
| Attaches already available object handle. More...
handle< handle_type, INVAL > & | operator= (handle< handle_type, INVAL > &&h) noexcept
| Move assignment. More...
| operator handle_type () const
| Auto-typecasting operator. More...
handle_type *& | operator* () const
| Returns the object handle value when the object handle is a pointer to a value (class, struct, etc.). More...
handle_type * | operator& ()
| Returns the object handle reference. More...
handle_type | operator-> () const
| Provides object handle member access when the object handle is a pointer to a class or struct. More...
bool | operator! () const
| Tests if the object handle is INVAL. More...
bool | operator< (handle_type h) const
| Is handle less than? More...
bool | operator<= (handle_type h) const
| Is handle less than or equal to? More...
bool | operator>= (handle_type h) const
| Is handle greater than or equal to? More...
bool | operator> (handle_type h) const
| Is handle greater than? More...
bool | operator!= (handle_type h) const
| Is handle not equal to? More...
bool | operator== (handle_type h) const
| Is handle equal to? More...
void | attach (handle_type h) noexcept
| Sets a new object handle for the class. More...
handle_type | detach ()
| Dismisses the object handle from this class. More...
void | free ()
| Destroys the object.

## Public Attributes

LPWIN32_FIND_DATA lpFindFileData | noexcept
else return | false

## Protected Member Functions

void | free_internal () noexcept override
| Closes a file search handle. More...
virtual void | free_internal () noexcept=0
| Abstract member function that must be implemented by child classes to do the actual object destruction. More...

## Additional Inherited Members

Public Types inherited from winstd::handle< HANDLE, INVALID_HANDLE_VALUE >
typedef HANDLE | handle_type
| Datatype of the object handle this template class handles.
Static Public Attributes inherited from winstd::handle< HANDLE, INVALID_HANDLE_VALUE >
static const HANDLE | invalid
| Invalid handle value.
Protected Attributes inherited from winstd::handle< HANDLE, INVALID_HANDLE_VALUE >
handle_type | m_h
| Object handle.

## Detailed Description

Find-file handle wrapper.

## Constructor & Destructor Documentation

## ~find_file()

virtual winstd::find_file::~find_file | ( |  | ) |

inlinevirtual

Closes a file search handle.

See also
  FindClose function

## Member Function Documentation

## __declspec()

winstd::find_file::__declspec | ( | deprecated("Use FindFirstFile") |  | ) |

Searches a directory for a file or subdirectory with a name that matches a specific name (or partial name if wildcards are used).

See also
  FindFirstFile function

Returns
  - `true` when succeeds;
  - `false` when fails. Use `GetLastError()` for failure reason.

## free_internal()

void winstd::find_file::free_internal | ( |  | ) |

inlineoverrideprotectedvirtualnoexcept

Closes a file search handle.

See also
  FindClose function

Implements winstd::handle< HANDLE, INVALID_HANDLE_VALUE >.

## Member Data Documentation

## noexcept

LPWIN32_FIND_DATA lpFindFileData winstd::find_file::noexcept

Initial value:
{
handle_type h = FindFirstFile(lpFileName, lpFindFileData)
winstd::handle< HANDLE, INVALID_HANDLE_VALUE >::handle_type
HANDLE handle_type
Datatype of the object handle this template class handles.
Definition: Common.h:608

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

- include/WinStd/Win.h