LLFIO
v2.00
|
A visitor for the filesystem traversal and comparison algorithm. More...
#include "difference.hpp"
Public Member Functions | |
virtual result< void > | post_enumeration (void *data, const directory_handle &dirh, directory_handle::buffers_type &contents, size_t depth) noexcept override |
This override implements the summary. | |
virtual result< directory_handle > | directory_open_failed (void *data, result< void >::error_type &&error, const directory_handle &dirh, path_view leaf, size_t depth) noexcept override |
This override ignores failures to traverse into the directory. | |
virtual result< bool > | pre_enumeration (void *data, const directory_handle &dirh, size_t depth) noexcept |
Called to decide whether to enumerate a directory. More... | |
virtual result< void > | stack_updated (void *data, size_t dirs_processed, size_t known_dirs_remaining, size_t depth_processed, size_t known_depth_remaining) noexcept |
Called whenever the traversed stack of directory hierarchy is updated. This can act as an estimated progress indicator, or to give an accurate progress indicator by matching it against a previous traversal. More... | |
virtual result< size_t > | finished (void *data, result< size_t > result) noexcept |
Called when a traversal finishes, whether due to success or failure. Always called from the original thread. | |
Static Public Member Functions | |
static void | accumulate (comparison_summary &acc, comparison_summary *state, const directory_handle *dirh, directory_entry &entry, stat_t::want already_have_metadata) |
static void | accumulate (traversal_summary &acc, traversal_summary *state, const directory_handle *dirh, directory_entry &entry, stat_t::want already_have_metadata) |
A visitor for the filesystem traversal and comparison algorithm.
Note that at any time, returning a failure causes compare()
to exit as soon as possible with the same failure.
You can override the members here inherited from traverse_visitor
, however note that compare()
is entirely implemented using traverse()
, so not calling the implementations here will affect operation.
|
inlinevirtualnoexceptinherited |
Called to decide whether to enumerate a directory.
Note that it is more efficient to ignore the directory entry in post_enumeration()
than to ignore it here, as a handle is opened for the directory before this callback. Equally, if you need that handle to inspect the directory e.g. to check if one is entering a different filesystem from the root, here is best.
The default returns true
.
|
inlinevirtualnoexceptinherited |
Called whenever the traversed stack of directory hierarchy is updated. This can act as an estimated progress indicator, or to give an accurate progress indicator by matching it against a previous traversal.
data | The third party data pointer passed to traverse() . |
dirs_processed | The total number of directories traversed so far. |
known_dirs_remaining | The currently known number of directories awaiting traversal. |
depth_processed | How many levels deep we have already completely traversed. |
known_depth_remaining | The currently known number of levels we shall traverse. |