﻿// Decompiled with JetBrains decompiler
// Type: System.Web.Hosting.VirtualFile
// Assembly: System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// MVID: 7E68A73E-4066-4F24-AB0A-F147209F50EC
// Assembly location: C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Web.dll

using System.IO;
using System.Web;

namespace System.Web.Hosting
{
  /// <summary>
  /// Represents a file object in a virtual file or resource space.
  /// </summary>
  public abstract class VirtualFile : VirtualFileBase
  {
    /// <summary>
    /// Gets a value that indicates that this is a virtual resource that should be treated as a file.
    /// </summary>
    /// 
    /// <returns>
    /// Always false.
    /// </returns>
    public override bool IsDirectory
    {
      get
      {
        return false;
      }
    }

    /// <summary>
    /// Initializes a new instance of the <see cref="T:System.Web.Hosting.VirtualFile"/> class.
    /// </summary>
    /// <param name="virtualPath">The virtual path to the resource represented by this instance. </param>
    protected VirtualFile(string virtualPath)
    {
      this._virtualPath = VirtualPath.Create(virtualPath);
    }

    /// <summary>
    /// When overridden in a derived class, returns a read-only stream to the virtual resource.
    /// </summary>
    /// 
    /// <returns>
    /// A read-only stream to the virtual file.
    /// </returns>
    public abstract Stream Open();
  }
}
