Table of Contents

Method MessageFileName

Namespace
MailFathom.Domain.Exports
Assembly
MailFathom.Domain.dll

MessageFileName(DateTimeOffset, long, long, MaildirFlagSet)

Mints the file name one message is written under, carrying the flags Maildir has a form for.

public static string MessageFileName(DateTimeOffset receivedAt, long ordinal, long byteLength, MaildirFlagSet flags)

Parameters

receivedAt DateTimeOffset

When the message arrived, which is the timestamp a Maildir name begins with.

ordinal long

The message's position in this export, which makes the name unique without a counter shared between folders.

byteLength long

How many bytes the message holds, which the S= field of the name reports.

flags MaildirFlagSet

The flags the message carries.

Returns

string

A file name of the form <seconds>.<ordinal>.mailfathom,S=<size>:2,<flags>.

Remarks

The flag letters are written in ascending ASCII order, which is what the Maildir convention asks of them and what makes one message's name the same however the flags were read. The host field is a constant rather than this deployment's own name: a host name in an archive a person carries away is a fact about the operator that the export has no reason to disclose.

Exceptions

ArgumentOutOfRangeException

Thrown when ordinal is negative or byteLength is negative.