Skip to content

Commit d1fa156

Browse files
rafalmaciagclaude
andcommitted
Add Length property to AbsolutePath and RelativePath
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4fe49a2 commit d1fa156

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

src/ModelingEvolution.FileSystem/AbsolutePath.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ public AbsolutePath(string path)
2626
_value = NormalizePath(path);
2727
}
2828

29+
/// <summary>
30+
/// Gets the length of the path string.
31+
/// </summary>
32+
public int Length => (_value ?? string.Empty).Length;
33+
2934
/// <summary>
3035
/// Gets the file name portion of the path as a RelativePath.
3136
/// </summary>

src/ModelingEvolution.FileSystem/RelativePath.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ public RelativePath(string path)
3434
/// </summary>
3535
public bool IsEmpty => string.IsNullOrEmpty(_value);
3636

37+
/// <summary>
38+
/// Gets the length of the path string.
39+
/// </summary>
40+
public int Length => (_value ?? string.Empty).Length;
41+
3742
/// <summary>
3843
/// Gets the file name portion of the path as a RelativePath.
3944
/// </summary>

0 commit comments

Comments
 (0)