2024-12-18 23:46:42 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace ZXLT.FileSystem
|
|
|
|
|
{
|
2024-12-19 23:07:52 +08:00
|
|
|
|
public enum FileSystemInfoType
|
|
|
|
|
{
|
|
|
|
|
File,
|
|
|
|
|
Directory,
|
|
|
|
|
}
|
|
|
|
|
|
2024-12-18 23:46:42 +08:00
|
|
|
|
public abstract class FileSystemInfo
|
|
|
|
|
{
|
|
|
|
|
protected string _name;
|
|
|
|
|
protected string FullPath;
|
2024-12-19 23:07:52 +08:00
|
|
|
|
public DateTime CreationTime { get; }
|
2024-12-18 23:46:42 +08:00
|
|
|
|
public abstract bool Exists { get; }
|
|
|
|
|
public abstract string Name { get; }
|
|
|
|
|
public virtual string FullName => FullPath;
|
2024-12-19 23:07:52 +08:00
|
|
|
|
public abstract FileSystemInfoType FileSystemInfoType { get; }
|
2024-12-18 23:46:42 +08:00
|
|
|
|
}
|
|
|
|
|
}
|