Skip to content

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.

Members

1. Filename Property

    /// <summary>
    /// the locator for locating this file on current storage system
    /// </summary>
    string Filename { get; }

2. StartPosition Property

    /// <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; }

3. EndPosition Property

    /// <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; }

4. Length Property

    /// <summary>
    /// the size of this file in bytes
    /// </summary>
    long Length { get; }

5. OpenRead Method

    /// <summary>
    /// Open a Stream to read this file
    /// </summary>
    /// <returns></returns>
    Stream OpenRead();

6. OpenText Method

    /// <summary>
    /// Open a StreamReader to read this file as a text file
    /// </summary>
    /// <returns></returns>
    StreamReader OpenText();

Clone this wiki locally