Xceed .NET Libraries Documentation
Xceed.FileSystem Assembly / Xceed.FileSystem Namespace / StreamFile Class
Members Example


In This Topic
    StreamFile Class
    In This Topic
    Specialization of the AbstractFile class that implements access to any type of stream as though it were a file.
    Syntax
    'Declaration
     
    Public Class StreamFile 
       Inherits AbstractFile
    'Usage
     
    Dim instance As StreamFile
    public class StreamFile : AbstractFile 
    Example
    The following example demonstrates how to extract the contents of a zip file contained within the resources of an application to a local folder.
    ' Create a stream that access a zip file contained within the resources
    ' of an application.
    Dim resources As Stream = Me.GetType().Assembly.GetManifestResourceStream( "Resources.zip" )
    
    ' Initialize a new instance of the StreamFile class specifying the inner stream
    ' as well as the name of the file.
    Dim file As New StreamFile( resources, "Resources.zip" )
    
    ' Initialize a new instance of the ZipArchive class using 
    ' newly created StreamFile object.
    Dim zip As New ZipArchive( file )
    
    ' Copy files from the zip file contained within the resources to a local folder.
    zip.CopyFilesTo( New DiskFolder( "d:\Destination" ), false, true )
    // Create a stream that access a zip file contained within the resources
    // of an application.
    Stream resources = this.GetType().Assembly.GetManifestResourceStream( "Resources.zip" );
    
    // Initialize a new instance of the StreamFile class specifying the inner stream
    // as well as the name of the file.
    StreamFile file = new StreamFile( resources, "Resources.zip" );
    
    // Initialize a new instance of the ZipArchive class using 
    // newly created StreamFile object.
    ZipArchive zip = new ZipArchive( file );
    
    // Copy files from the zip file contained within the resources to a local folder.
    zip.CopyFilesTo( new DiskFolder( @"d:\Destination" ), false, true );
    Inheritance Hierarchy

    System.Object
       System.MarshalByRefObject
          Xceed.FileSystem.FileSystemItem
             Xceed.FileSystem.AbstractFile
                Xceed.FileSystem.StreamFile

    Public Constructors
     NameDescription
    Public ConstructorOverloaded.   
    Top
    Public Properties
     NameDescription
    Public PropertyGets or sets the attributes of the item. (Inherited from Xceed.FileSystem.FileSystemItem)
    Public PropertyGets or sets the creation date and time of the item. (Inherited from Xceed.FileSystem.FileSystemItem)
    Public PropertyGets a boolean value indicating if the item physically exists. (Inherited from Xceed.FileSystem.FileSystemItem)
    Public PropertyGets the full name of the item. (Inherited from Xceed.FileSystem.FileSystemItem)
    Public PropertyGets a boolean value indicating if the item supports attributes. (Inherited from Xceed.FileSystem.FileSystemItem)
    Public PropertyGets a boolean value indicating if the item supports having a creation date and time. (Inherited from Xceed.FileSystem.FileSystemItem)
    Public PropertyGets a boolean value indicating if the item supports having a last access date and time. (Inherited from Xceed.FileSystem.FileSystemItem)
    Public PropertyGets a boolean value indicating if the item supports having a last write date and time. (Inherited from Xceed.FileSystem.FileSystemItem)
    Public PropertyGets a human-readable full pathname representing the fully qualified path of all host files containing the item and the path of the item itself. (Inherited from Xceed.FileSystem.FileSystemItem)
    Public PropertyGets an AbstractFile containing an archived version of this FileSystemItem. (Inherited from Xceed.FileSystem.FileSystemItem)
    Public PropertyGets or sets the last access date and time of the item. (Inherited from Xceed.FileSystem.FileSystemItem)
    Public PropertyGets or sets the modification date and time of the item. (Inherited from Xceed.FileSystem.FileSystemItem)
    Public PropertyGets or sets the filename, without path, of the item. (Inherited from Xceed.FileSystem.FileSystemItem)
    Public PropertyGets a reference to the parent folder of this item. (Inherited from Xceed.FileSystem.FileSystemItem)
    Public PropertyGets a reference to the root folder of this item. (Inherited from Xceed.FileSystem.FileSystemItem)
    Public PropertyGets the size of the file in bytes. (Inherited from Xceed.FileSystem.AbstractFile)
    Top
    Protected Properties
     NameDescription
    Protected PropertyOverridden. Gets the IBatchUpdateable implementation for this item.  
    Protected PropertyOverridden. Gets or sets the attributes of the item.  
    Protected PropertyOverridden. Gets or sets the creation date and time of the item.  
    Protected PropertyOverridden. Gets a boolean value indicating if the item physically exists.  
    Protected PropertyOverridden. Gets the full name of the item.  
    Protected PropertyGets a boolean value indicating if the item supports attributes. (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected PropertyGets a boolean value indicating if the item supports having a creation date and time. (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected PropertyGets a boolean value indicating if the item supports having a last access date and time. (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected PropertyGets a boolean value indicating if the item supports having a last write date and time. (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected PropertyOverridden. Gets or sets the last access date and time of the item.  
    Protected PropertyOverridden. Gets or sets the modification date and time of the item.  
    Protected PropertyOverridden. Gets or sets the filename, without path, of the item.  
    Protected PropertyOverridden. Gets a reference to the parent folder of this item.  
    Protected PropertyOverridden. Gets a reference to the root folder of this item.  
    Protected PropertyOverridden. Gets the size of the file in bytes.  
    Protected PropertyGets the characters that are invalid in file and folder names. (Inherited from Xceed.FileSystem.FileSystemItem)
    Top
    Public Methods
     NameDescription
    Public MethodOverloaded. Copies the item's properties to another item. (Inherited from Xceed.FileSystem.FileSystemItem)
    Public MethodOverloaded. Copies the file's data to another file. (Inherited from Xceed.FileSystem.AbstractFile)
    Public MethodOverloaded. Creates the physical item represented by this FileSystemItem object. (Inherited from Xceed.FileSystem.FileSystemItem)
    Public Method (Inherited from System.MarshalByRefObject)
    Public MethodOverloaded. Creates a file and opens it for writing. (Inherited from Xceed.FileSystem.AbstractFile)
    Public MethodOverloaded. Permanently deletes the physical item. (Inherited from Xceed.FileSystem.FileSystemItem)
    Public Method (Inherited from Xceed.FileSystem.AbstractFile)
    Public Method (Inherited from Xceed.FileSystem.AbstractFile)
    Public Method (Inherited from Xceed.FileSystem.AbstractFile)
    Public Method (Inherited from System.MarshalByRefObject)
    Public Method (Inherited from Xceed.FileSystem.FileSystemItem)
    Public Method (Inherited from System.MarshalByRefObject)
    Public MethodOverridden. Gets a boolean value indicating if the source and target file are the same.  
    Public MethodOverloaded. Moves the contents of the AbstractFile object to the target AbstractFile object. (Inherited from Xceed.FileSystem.AbstractFile)
    Public MethodOverloaded. Opens the file for reading. (Inherited from Xceed.FileSystem.AbstractFile)
    Public MethodOverloaded. Opens the file for writing. (Inherited from Xceed.FileSystem.AbstractFile)
    Public MethodOverloaded. Re-reads the information from the physical item. (Inherited from Xceed.FileSystem.FileSystemItem)
    Public Method (Inherited from Xceed.FileSystem.FileSystemItem)
    Public MethodReturns the full name of the item. (Inherited from Xceed.FileSystem.FileSystemItem)
    Top
    Protected Methods
     NameDescription
    Protected Method (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected Internal MethodBuilds a list of FileSystemItem objects to process. (Inherited from Xceed.FileSystem.AbstractFile)
    Protected MethodHandles the special cases in regards to building the list of items to process when creating a FileSystemItem object. (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected Method (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected Method (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected MethodOverloaded.  (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected MethodThis method is reserved for internal use and is not intended to be used directly from your code. (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected MethodCopies the item's properties to another item. (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected MethodCopies the file into the destination. (Inherited from Xceed.FileSystem.AbstractFile)
    Protected Internal MethodOverridden. Creates the physical file. This method will always throw a FileSystemNotSupportedException exception since it is not possible to recreate a StreamFile once it has been destroyed.  
    Protected MethodCreates the file and opens it for writing. (Inherited from Xceed.FileSystem.AbstractFile)
    Protected Internal MethodOverridden. Permanently deletes the physical item.  
    Protected Method (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected Method (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected MethodOverridden. Opens the file for reading.  
    Protected MethodOverridden. Opens the file for writing.  
    Protected MethodOverridden. Re-reads the information from the physical item. In the case of a StreamFile object, there is nothing to refresh.  
    Protected Method (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected MethodEnsures that the System.DateTime value is valid. (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected MethodRetrieves a value indicating the default FileShare value to be used when opening read streams for copy/move operations. (Inherited from Xceed.FileSystem.AbstractFile)
    Protected MethodRetrieves a value indicating the default FileShare value to be used when opening write streams for copy/move operations. (Inherited from Xceed.FileSystem.AbstractFile)
    Protected MethodReturns the recommended buffer size for a stream copy operation. (Inherited from Xceed.FileSystem.AbstractFile)
    Protected MethodOverridden. Returns a boolean value indicating if the path passed is rooted.  
    Protected Method (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected MethodCopies each item in the FileSystemEventsSession object's list to each item's destination. (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected MethodCopies the item pair's current FileSystemItem to its target FileSystemItem. (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected MethodCreates each item in the FileSystemEventsSession object's list. (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected MethodCreates the item pair's current FileSystemItem. (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected MethodDeletes each item in the FileSystemEventsSession object's list. (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected MethodDeletes the item pair's current FileSystemItem. (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected MethodMoves each item in the FileSystemEventsSession object's list to each item's destination. (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected MethodMoves the item pair's current FileSystemItem to its target FileSystemItem. (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected MethodOverloaded.  (Inherited from System.MarshalByRefObject)
    Protected Method (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected MethodCalled when a client explicitly calls Create. (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected Method (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected Method (Inherited from Xceed.FileSystem.FileSystemItem)
    Protected Method (Inherited from Xceed.FileSystem.AbstractFile)
    Protected Method (Inherited from Xceed.FileSystem.AbstractFile)
    Top
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also