Freigeben über


ZipArchiveEntry Class

Inheritance Hierarchy

System.Object
  Microsoft.TeamFoundation.Server.Core.ZipArchiveEntry

Namespace:  Microsoft.TeamFoundation.Server.Core
Assembly:  Microsoft.TeamFoundation.Server.Core (in Microsoft.TeamFoundation.Server.Core.dll)

Syntax

'Declaration
Public Class ZipArchiveEntry
public class ZipArchiveEntry
public ref class ZipArchiveEntry
type ZipArchiveEntry =  class end
public class ZipArchiveEntry

The ZipArchiveEntry type exposes the following members.

Properties

  Name Description
Public property Archive The ZipArchive that this entry belongs to. If this entry has been deleted, this will return null.
Public property CompressedLength The compressed size of the entry. If the archive that the entry belongs to is in Create mode, attempts to get this property will always throw an exception. If the archive that the entry belongs to is in update mode, this property will only be valid if the entry has not been opened.
Public property FullName The relative path of the entry as stored in the Zip archive. Note that Zip archives allow any string to be the path of the entry, including invalid and absolute paths.
Public property LastWriteTime The last write time of the entry as stored in the Zip archive. When setting this property, the DateTime will be converted to the Zip timestamp format, which supports a resolution of two seconds. If the data in the last write time field is not a valid Zip timestamp, an indicator value of 1980 January 1 at midnight will be returned.
Public property Length The uncompressed size of the entry. This property is not valid in Create mode, and it is only valid in Update mode if the entry has not been opened.
Public property Name The filename of the entry. This is equivalent to the substring of Fullname that follows the final directory separator character.

Top

Methods

  Name Description
Public method Delete Deletes the entry from the archive.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method ExtractToFile(String) Creates a file on the file system with the entry’s contents and the specified name. The last write time of the file is set to the entry’s last write time. This method does not allow overwriting of an existing file with the same name. Attempting to extract explicit directories (entries with names that end in directory separator characters) will not result in the creation of a directory.
Public method ExtractToFile(String, Boolean) Creates a file on the file system with the entry’s contents and the specified name. The last write time of the file is set to the entry’s last write time. This method does allows overwriting of an existing file with the same name.
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Open Opens the entry. If the archive that the entry belongs to was opened in Read mode, the returned stream will be readable, and it may or may not be seekable. If Create mode, the returned stream will be writeable and not seekable. If Update mode, the returned stream will be readable, writeable, seekable, and support SetLength.
Public method ToString Returns the FullName of the entry. (Overrides Object.ToString().)

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.TeamFoundation.Server.Core Namespace