ByteSync
ByteSync copied to clipboard
[feature] Create SkippedEntry model and SkipReason enum
Summary
Create a SkippedEntry model class to represent filesystem entries that were encountered during inventory but excluded for various reasons. This enables tracking and reporting of filtered entries.
Background
Currently, when entries are skipped during inventory building, they are:
- Logged at
InformationorWarninglevel - Not tracked in any data structure
- Not visible to the user
This makes it difficult to understand what was excluded and why.
Proposed Model
namespace ByteSync.Models.Inventories;
public class SkippedEntry
{
public string FullPath { get; init; } = string.Empty;
public string RelativePath { get; init; } = string.Empty;
public string Name { get; init; } = string.Empty;
public SkipReason Reason { get; init; }
public FileSystemEntryKind? DetectedKind { get; init; }
public DateTime SkippedAt { get; init; } = DateTime.UtcNow;
}
Proposed Enum
namespace ByteSync.Models.Inventories;
public enum SkipReason
{
Unknown = 0,
/// <summary>Hidden file or directory (user setting)</summary>
Hidden = 1,
/// <summary>OS system file attribute (Windows)</summary>
SystemAttribute = 2,
/// <summary>Known noise file (.DS_Store, thumbs.db, etc.)</summary>
NoiseFile = 3,
/// <summary>Symbolic link</summary>
Symlink = 4,
/// <summary>POSIX special file (device, FIFO, socket)</summary>
SpecialPosixFile = 5,
/// <summary>File marked as offline (cloud placeholder)</summary>
Offline = 6,
/// <summary>Access denied or permission error</summary>
Inaccessible = 7,
/// <summary>File disappeared during scan</summary>
NotFound = 8,
/// <summary>IO error during inspection</summary>
IoError = 9
}
Acceptance Criteria
- [ ] Create
SkippedEntryclass inByteSync.Models.Inventories - [ ] Create
SkipReasonenum inByteSync.Models.Inventories - [ ] Add XML documentation for each enum value
- [ ] Use
initproperties for immutability - [ ] Include
DetectedKindto store classification when relevant - [ ] Unit tests for model construction
Technical Notes
SkippedEntryis a lightweight DTO, not persisted to inventory files- Used for runtime tracking and UI display
DetectedKindis nullable because some skip reasons (e.g.,Inaccessible) occur before classification
Dependencies
- Requires:
FileSystemEntryKindenum (issue #262)
Priority
Standard — Enables transparent reporting of filtered entries.