You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
851 B
26 lines
851 B
1 year ago
|
namespace StabilityMatrix.Core.Models.FileInterfaces;
|
||
1 year ago
|
|
||
|
public interface IPathObject
|
||
|
{
|
||
|
/// <summary> Full path of the file system object. </summary>
|
||
|
string FullPath { get; }
|
||
|
|
||
|
/// <summary> Whether the file system object is a symbolic link or junction. </summary>
|
||
|
bool IsSymbolicLink { get; }
|
||
|
|
||
|
/// <summary> Gets the size of the file system object. </summary>
|
||
|
long GetSize();
|
||
|
|
||
|
/// <summary> Gets the size of the file system object asynchronously. </summary>
|
||
|
Task<long> GetSizeAsync() => Task.Run(GetSize);
|
||
|
|
||
|
/// <summary> Whether the file system object exists. </summary>
|
||
|
bool Exists { get; }
|
||
|
|
||
|
/// <summary> Deletes the file system object </summary>
|
||
|
void Delete();
|
||
|
|
||
|
/// <summary> Deletes the file system object asynchronously. </summary>
|
||
1 year ago
|
public Task DeleteAsync() => Task.Run(Delete);
|
||
1 year ago
|
}
|