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
Return Value
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.