CyberEngineMkIII
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
CYBWin32Path.hpp
Go to the documentation of this file.
1 #pragma once
3 
4 namespace CYB {
5  namespace Platform {
6  namespace System {
7  class Path;
8  namespace Implementation {
10  class Path {
11  protected:
14  private:
17  Win32::HANDLE FFindHandle;
18  private:
26  void AssignOrRecurse(Win32::WIN32_FIND_DATA&& AFindData);
27  public:
37  DirectoryEntry(const System::Path& APath);
39  ~DirectoryEntry() final override;
40 
42  API::Interop::Object<API::Path>& operator*(void) noexcept final override;
44  API::Interop::Object<API::Path>* operator->(void) noexcept final override;
45 
47  void operator++(void) final override;
48  };
49  protected:
50  API::String::UTF16 FWidePath;
51  protected:
59  static int CheckDirectoryExists(const API::String::UTF16& APath) noexcept;
60 
61  Path() noexcept = default;
62  public:
69  const API::String::UTF16& WidePath(void) const noexcept;
70  };
71  };
72  };
73  };
74 };
void AssignOrRecurse(Win32::WIN32_FIND_DATA &&AFindData)
Assign the current data to FPathListing if it is not '.' or '..'.
Template type for wrapping pointers and treating them as objects. Only works with CyberEngine interfa...
Definition: Object.hpp:10
Iterator for paths in a directory.
Definition: Path.hpp:40
Uses the FindFile API to enumerate directories.
const API::String::UTF16 & WidePath(void) const noexcept
Accessor for other Win32 implementations that require the UTF16 Path.
const System::Path & FOriginalPath
The Path of the directory being enumerated.
Adds a UTF16 accompaniment to the UTF8 string of System::Path.
DirectoryEntry(const System::Path &APath)
Begin the directory listing operation of APath.
API::Interop::Object< API::Path > FPathListing
The API exposure for the current enumerated Path.
API::String::UTF16 FWidePath
The UTF16 string.
static int CheckDirectoryExists(const API::String::UTF16 &APath) noexcept
Try to check for the existence of a directory.
Win32::HANDLE FFindHandle
The Win32 find handle.
Used for manipulating Paths. Paths will always exist either as a file or directory. Paths are '/' delimited when forming though may not be while retrieving. File names ".." will ascend a directory and '.' represents a no-op.
Definition: CYBPath.hpp:10
~DirectoryEntry() finaloverride
See Default Constructors and Destructor.