Deployment Tools Foundation
OpenFileReadStream Method (path, attributes, lastWriteTime)
Deployment Tools Foundation Namespaces ► Microsoft.Deployment.Compression ► IPackStreamContext ► OpenFileReadStream(String, FileAttributes%, DateTime%)
Opens a stream to read a file that is to be included in an archive.
Declaration Syntax
C# | Visual Basic | Visual C++ |
Stream OpenFileReadStream( string path, out FileAttributes attributes, out DateTime lastWriteTime )
Function OpenFileReadStream ( path As String, <OutAttribute> ByRef attributes As FileAttributes, <OutAttribute> ByRef lastWriteTime As DateTime ) As Stream
Stream^ OpenFileReadStream( String^ path, [OutAttribute] FileAttributes% attributes, [OutAttribute] DateTime% lastWriteTime )
Parameters
- path (String)
- The path of the file within the archive. This is often, but not necessarily, the same as the relative path of the file outside the archive.
- attributes (FileAttributes%)
- Returned attributes of the opened file, to be stored in the archive.
- lastWriteTime (DateTime%)
- Returned last-modified time of the opened file, to be stored in the archive.
Return Value
Stream
A readable Stream where the file bytes will be read from before they are compressed, or null to skip inclusion of the file and continue to the next file.
A readable Stream where the file bytes will be read from before they are compressed, or null to skip inclusion of the file and continue to the next file.
Assembly: Microsoft.Deployment.Compression (Module: Microsoft.Deployment.Compression.dll) Version: 3.0.0.0 (3.9.1006.0)