Skip to content

ExportEntry

Namespace Nfty.Core.Publish in assembly Nfty.Core.

public record ExportEntry

One file an export will carry, and where it will sit.

Constructors

ExportEntry(string, string, long)

public ExportEntry(string Source, string Name, long Bytes);

Parameters

  • Source (string) - The file on disk now.
  • Name (string) - Its path inside the export, always with / separators.
  • Bytes (long) - Its size, so a plan can be totalled without opening anything.

Properties

Bytes

public long Bytes { get; init; }

Its size, so a plan can be totalled without opening anything.

Name

public string Name { get; init; }

Its path inside the export, always with / separators.

Render

public Func<byte[]>? Render { get; init; }

Makes the file's bytes when the export is written, for a file the export rewrites or invents (item metadata with new links, collection.json); null for a file copied as it stands.

Remarks

For a rewritten item ExportEntry.Source is the Set's own file and ExportEntry.Bytes is that file's size, close to but not the final size; the plan an ExportResult carries has the real one.

SetNumber

public int? SetNumber { get; init; }

The set number of the asset this file belongs to, or null for a file that is not one asset's.

Remarks

Carried explicitly because a renamed file (token ids, a different start) no longer spells it; the number stamped into a debug image must stay the SET number.

Source

public string Source { get; init; }

The file on disk now.