Deployment Tools Foundation
OpenFileWriteStream Method (path, fileSize, lastWriteTime)
Deployment Tools Foundation Namespaces ► Microsoft.Deployment.Compression ► ArchiveFileStreamContext ► OpenFileWriteStream(String, Int64, DateTime)
Opens a stream for writing extracted file bytes.
Declaration Syntax
C# | Visual Basic | Visual C++ | F# |
public virtual Stream OpenFileWriteStream( string path, long fileSize, DateTime lastWriteTime )
Public Overridable Function OpenFileWriteStream ( path As String, fileSize As Long, lastWriteTime As DateTime ) As Stream
public: virtual Stream^ OpenFileWriteStream( String^ path, long long fileSize, DateTime lastWriteTime )
abstract OpenFileWriteStream : path : string * fileSize : int64 * lastWriteTime : DateTime -> Stream override OpenFileWriteStream : path : string * fileSize : int64 * lastWriteTime : DateTime -> Stream
Return Value
Stream
A stream where extracted file bytes are to be written, or null to skip extraction of the file and continue to the next file.
A stream where extracted file bytes are to be written, or null to skip extraction of the file and continue to the next file.
Remarks
This method opens a file using the following logic:
If the Directory and the Files mapping
are both null, the path is treated as relative to the current directory,
and that file is opened.If the Directory is not null but the Files
mapping is null, the path is treated as relative to that directory, and
that file is opened.If the Directory is null but the Files
mapping is not null, the path parameter is used as a key into the mapping,
and the resulting value is the file path that is opened, relative to the
current directory (or it may be an absolute path). If no mapping exists,
the file is skipped.If both the Directory and the Files
mapping are specified, the path parameter is used as a key into the
mapping, and the resulting value is the file path that is opened,
relative to the specified directory (or it may be an absolute path).
If no mapping exists, the file is skipped.
If the ExtractOnlyNewerFiles flag is set, the file is skipped if a file currently exists in the same path with an equal or newer write time.
Assembly: Microsoft.Deployment.Compression (Module: Microsoft.Deployment.Compression.dll) Version: 3.0.0.0 (3.11.1.2318)