Skip to content

Types

๐Ÿค– AI-Generated Content

This documentation was generated with AI assistance and is still being audited. Some, or potentially a lot, of this information may be inaccurate. Learn more.

provide.foundation.file.operations.types

File operation data types and structures.

Classes

DetectorConfig

Configuration for operation detection.

FileEvent

Single file system event with rich metadata.

Attributes
sequence property
sequence: int

Convenience accessor for sequence number.

size_delta property
size_delta: int | None

Change in file size, if known.

timestamp property
timestamp: datetime

Convenience accessor for timestamp.

FileEventMetadata

Rich metadata for a file event.

FileOperation

A detected logical file system operation.

Attributes
duration_ms property
duration_ms: float

Total operation duration.

event_count property
event_count: int

Number of events in this operation.

Functions
get_timeline
get_timeline() -> list[tuple[float, FileEvent]]

Get events with relative timestamps (ms from start).

Source code in provide/foundation/file/operations/types.py
def get_timeline(self) -> list[tuple[float, FileEvent]]:
    """Get events with relative timestamps (ms from start)."""
    return [
        ((e.timestamp - self.start_time).total_seconds() * 1000, e)
        for e in sorted(self.events, key=lambda x: x.sequence)
    ]

OperationType

Bases: Enum

Types of detected file operations.