43 lines
1.0 KiB
C#
43 lines
1.0 KiB
C#
using BITKit;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BITKit.IO
|
|
{
|
|
public interface IStorageFile
|
|
{
|
|
string GetPath();
|
|
string GetName();
|
|
long GetSize();
|
|
DateTime GetLastUpdated();
|
|
string GetFileType();
|
|
|
|
/// <summary>
|
|
/// Creates a stream for reading from the file.
|
|
/// </summary>
|
|
Stream OpenRead();
|
|
Task<Stream> OpenReadAsync();
|
|
|
|
/// <summary>
|
|
/// Creates a stream for writing to the file.
|
|
/// </summary>
|
|
Stream OpenWrite();
|
|
Task<Stream> OpenWriteAsync();
|
|
|
|
/// <summary>
|
|
/// Creates a stream for writing to the file, and truncates the existing content.
|
|
/// </summary>
|
|
Stream CreateFile();
|
|
Task<Stream> CreateFileAsync();
|
|
|
|
/// <summary>
|
|
/// Get string from StreamReader
|
|
/// </summary>
|
|
string GetText();
|
|
Task<string> GetTextAsync();
|
|
}
|
|
} |