EditorTool3D/Assets/ZXL/Scripts/FileSystem/FileSystemInfo.cs

23 lines
596 B
C#
Raw Normal View History

2024-12-18 23:46:42 +08:00
using System;
2024-12-20 13:37:42 +08:00
using System.IO;
2024-12-18 23:46:42 +08:00
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-20 13:37:42 +08:00
public string DirectoryPath => Path.GetDirectoryName(FullPath);
2024-12-19 23:07:52 +08:00
public abstract FileSystemInfoType FileSystemInfoType { get; }
2024-12-18 23:46:42 +08:00
}
}