Skip to content

Commit e43f48f

Browse files
add FileInfo2 for abstracted FileInformation
1 parent 86e5a1b commit e43f48f

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using System;
2+
3+
namespace FileSyncLibNet.Commons
4+
{
5+
internal class FileInfo2 //: FileSystemInfo
6+
{
7+
public FileInfo2(string name, bool exists = true)
8+
{
9+
Name = name;
10+
Exists = exists;
11+
}
12+
public long Length { get; set; }
13+
public DateTime LastWriteTime { get; set; }
14+
public bool Exists { get; }
15+
public string Name { get; }
16+
17+
public override string ToString()
18+
{
19+
return $"{Name}, {LastWriteTime}, Size {Length}";
20+
}
21+
22+
}
23+
}

0 commit comments

Comments
 (0)