Skip to main content

FileInfoWrapper

A class in Alta.IO, Alta.Utilities.

IFileAccess over a plain FileInfo on disk.

Constructors​

MemberWhat it is
FileInfoWrapper(FileInfo file)Creates a FileInfoWrapper from file.

Fields​

1 private and internal field
MemberWhat it is
private FileInfo fileThe wrapped FileInfo.

Properties​

MemberWhat it is
bool Exists { get; }Whether the file exists, from the cached FileInfo.
string FullName { get; }Full path of the file.
string Name { get; }File name with extension.

Methods​

MemberWhat it is
void Delete()Deletes the file.
Task DeleteAsync()Deletes the file on a background task.
Task<bool> IsExistingAsync()Returns Exists as a finished task.
void Refresh()Refreshes the cached file info from disk.