2024-11-11 11:37:02 -05:00
|
|
|
|
using OpenHarbor.Storage.Abstractions;
|
2020-03-13 11:18:25 -04:00
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
2024-11-10 16:57:24 -05:00
|
|
|
|
namespace OpenHarbor.Storage.Physical
|
2020-03-13 11:18:25 -04:00
|
|
|
|
{
|
|
|
|
|
public class PhysicalFileInfo : IFileInfo
|
|
|
|
|
{
|
|
|
|
|
private readonly FileInfo fileInfo;
|
|
|
|
|
|
|
|
|
|
public PhysicalFileInfo(FileInfo fileInfo)
|
|
|
|
|
{
|
|
|
|
|
this.fileInfo = fileInfo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Path => fileInfo.FullName;
|
|
|
|
|
public string FileName => fileInfo.Name;
|
|
|
|
|
public string Extension => fileInfo.Extension;
|
|
|
|
|
public long FileSize => fileInfo.Length;
|
|
|
|
|
public DateTimeOffset? CreatedTime => fileInfo.CreationTime;
|
|
|
|
|
public DateTimeOffset? LastModifiedTime => fileInfo.LastWriteTime;
|
|
|
|
|
public DateTimeOffset? LastAccessTime => fileInfo.LastAccessTime;
|
|
|
|
|
public DateTime? CreatedTimeUtc => fileInfo.CreationTimeUtc;
|
|
|
|
|
public DateTime? LastModifiedTimeUtc => fileInfo.LastWriteTimeUtc;
|
|
|
|
|
public DateTime? LastAccessTimeUtc => fileInfo.LastAccessTimeUtc;
|
|
|
|
|
public bool IsDirectory => false;
|
|
|
|
|
}
|
|
|
|
|
}
|