using XFESystem.Core;
namespace XFESystem.Documents;
/// <summary>A path in XFESystem's filesystem, never a Windows or Unix host path.</summary>
public sealed record DocumentLocation
{
public string Value { get; }
public DocumentLocation(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
var normalized = SystemPaths.Normalize(value);
if (normalized == SystemPaths.Root || value.EndsWith('\\'))
throw new ArgumentException("A document path must name a file in XFESystem's X: drive.", nameof(value));
Value = normalized;
}
public override string ToString() => Value;
}
using XFESystem.Core;
namespace XFESystem.Documents;
/// <summary>A path in XFESystem's filesystem, never a Windows or Unix host path.</summary>
public sealed record DocumentLocation
{
public string Value { get; }
public DocumentLocation(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
var normalized = SystemPaths.Normalize(value);
if (normalized == SystemPaths.Root || value.EndsWith('\\'))
throw new ArgumentException("A document path must name a file in XFESystem's X: drive.", nameof(value));
Value = normalized;
}
public override string ToString() => Value;
}