namespace AIStudio.Tools;
public static class FileInfoExtensions
{
///
/// Returns the file size in human-readable format.
///
/// The file info object.
/// The file size in human-readable format.
public static string FileSize(this FileInfo fileInfo)
{
if (!fileInfo.Exists)
return "N/A";
return fileInfo.Length.FileSize();
}
}