Tracks the state of files being written to and their source content.
This helps determine when a file should be overwritten when using
Unwritten
.
- Namespace
- Statiq
.Common - Implementing Types
graph BT
Type["IFileWriteTracker"]
class Type type-node
Implementing0["TestFileWriteTracker"]-.->Type
click Implementing0 "/api/Statiq.Testing/TestFileWriteTracker"
Syntax
public interface IFileWriteTracker
Properties
Name | Property Type | Summary |
---|---|---|
Current |
int |
Gets the count of how many files were actually written.
|
CurrentContent | IEnumerable |
Gets the path and hash code for all current file content.
|
Current |
int |
Gets the count of how many files were written, whether actually or already existed.
|
CurrentWrites | IEnumerable |
Gets the path and hash code for all current file writes.
|
PreviousContent | IEnumerable |
Gets the path and hash code for all previous file content (from before the most recent
Reset() .
|
PreviousWrites | IEnumerable |
Gets the path and hash code for all previous file writes (from before the most recent
Reset() .
|
Methods
Name | Return Value | Summary |
---|---|---|
Reset |
void |
Resets the tracking for another execution.
|
RestoreAsync |
Task |
Restores the state saved by
SaveAsync(IReadOnlyFileSystem, IFile) to the previous state.
|
SaveAsync |
Task |
Saves the current state to a file.
|
TrackContent |
void |
Tracks data that was written using a hash code of it's content.
|
TrackWrite |
void |
Tracks a written file using a hash code that represents the file state after the write operation.
|
TryGetCurrentContent |
bool |
Attempts to get a hash code for written content.
|
TryGetCurrentWrite |
bool |
Attempts to get a hash code for a written file.
|
Try |
bool |
Attempts to get a hash code for previously written content.
|
TryGetPreviousWrite |
bool |
Attempts to get a hash code for a previously written file.
|