Class FileSystemChangeEvent#
Defined in File FileEvent.h
Inheritance Relationships#
Base Type#
public TRAP::Events::Event
(Class Event)
Class Documentation#
-
class FileSystemChangeEvent : public TRAP::Events::Event#
Filesystem change event.
Public Functions
-
FileSystemChangeEvent(TRAP::FileSystem::FileSystemStatus status, std::filesystem::path path, const TRAP::Optional<std::filesystem::path> &oldPath = TRAP::NullOpt) noexcept#
Constructor.
- Parameters:
status – Status of the provided file or folder.
path – Path to a file or folder.
oldName – Optional: Old path of the file or folder. Only set if status is FileSystemStatus::Renamed.
-
~FileSystemChangeEvent() override = default#
Destructor.
-
consteval FileSystemChangeEvent(const FileSystemChangeEvent&) noexcept = delete#
Copy constructor.
-
consteval FileSystemChangeEvent &operator=(const FileSystemChangeEvent&) noexcept = delete#
Copy assignment operator.
-
FileSystemChangeEvent(FileSystemChangeEvent&&) noexcept = default#
Move constructor.
-
FileSystemChangeEvent &operator=(FileSystemChangeEvent&&) noexcept = default#
Move assignment operator.
-
constexpr TRAP::FileSystem::FileSystemStatus GetStatus() const noexcept#
Get the status of the file or folder.
- Returns:
The status of the file or folder.
-
std::filesystem::path GetPath() const noexcept#
Get the path of the file or folder.
- Returns:
The path of the file or folder.
-
TRAP::Optional<std::filesystem::path> GetOldPath() const noexcept#
Get the old path of the file or folder.
Note
Only set when FileSystemStatus is FileSystemStatus::Renamed.
- Returns:
The old path of the file or folder if any, empty optional otherwise.
-
virtual constexpr EventType GetEventType() const noexcept override#
Retrieve the EventType of the event.
- Returns:
EventType.
-
virtual constexpr std::string GetName() const override#
Retrieve the name of the event.
- Returns:
Name.
-
virtual constexpr EventCategory GetCategoryFlags() const noexcept override#
Retrieve the category flags of the event.
- Returns:
Combination of one or more EventCategory’s.
-
virtual std::string ToString() const override#
Get a string representation of the event.
- Returns:
String representation.
-
FileSystemChangeEvent(TRAP::FileSystem::FileSystemStatus status, std::filesystem::path path, const TRAP::Optional<std::filesystem::path> &oldPath = TRAP::NullOpt) noexcept#