-
Notifications
You must be signed in to change notification settings - Fork 7
IFileEntry interface
lchrennew edited this page Dec 18, 2012
·
4 revisions
WebFileManager.IFileEntry defines an abstract model to represent files, it wraps information required for access a file.
/// <summary>
/// the locator for locating this file on current storage system
/// </summary>
string Filename { get; }
/// <summary>
/// the start byte position to read start from when downloading is performed.
/// default should be 0 representing Read From Begining
/// </summary>
long StartPosition { get; set; }
/// <summary>
/// the end byte position to read end to when downloading is performed.
/// default should be -1 representing Read To End
/// </summary>
long EndPosition { get; set; }
/// <summary>
/// the size of this file in bytes
/// </summary>
long Length { get; }
/// <summary>
/// Open a Stream to read this file
/// </summary>
/// <returns></returns>
Stream OpenRead();
/// <summary>
/// Open a StreamReader to read this file as a text file
/// </summary>
/// <returns></returns>
StreamReader OpenText();