go/src/archive/zip/struct.go

const Store

const Deflate

const fileHeaderSignature

const directoryHeaderSignature

const directoryEndSignature

const directory64LocSignature

const directory64EndSignature

const dataDescriptorSignature

const fileHeaderLen

const directoryHeaderLen

const directoryEndLen

const dataDescriptorLen

const dataDescriptor64Len

const directory64LocLen

const directory64EndLen

const creatorFAT

const creatorUnix

const creatorNTFS

const creatorVFAT

const creatorMacOSX

const zipVersion20

const zipVersion45

const uint16max

const uint32max

const zip64ExtraID

const ntfsExtraID

const unixExtraID

const extTimeExtraID

const infoZipUnixExtraID

type FileHeader

// FileInfo returns an fs.FileInfo for the [FileHeader].
func (h *FileHeader) FileInfo() fs.FileInfo {}

type headerFileInfo

func (fi headerFileInfo) Name() string {}

func (fi headerFileInfo) Size() int64 {}

func (fi headerFileInfo) IsDir() bool {}

func (fi headerFileInfo) ModTime() time.Time {}

func (fi headerFileInfo) Mode() fs.FileMode {}

func (fi headerFileInfo) Type() fs.FileMode {}

func (fi headerFileInfo) Sys() any          {}

func (fi headerFileInfo) Info() (fs.FileInfo, error) {}

func (fi headerFileInfo) String() string {}

// FileInfoHeader creates a partially-populated [FileHeader] from an
// fs.FileInfo.
// Because fs.FileInfo's Name method returns only the base name of
// the file it describes, it may be necessary to modify the Name field
// of the returned header to provide the full path name of the file.
// If compression is desired, callers should set the FileHeader.Method
// field; it is unset by default.
func FileInfoHeader(fi fs.FileInfo) (*FileHeader, error) {}

type directoryEnd

// timeZone returns a *time.Location based on the provided offset.
// If the offset is non-sensible, then this uses an offset of zero.
func timeZone(offset time.Duration) *time.Location {}

// msDosTimeToTime converts an MS-DOS date and time into a time.Time.
// The resolution is 2s.
// See: https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-dosdatetimetofiletime
func msDosTimeToTime(dosDate, dosTime uint16) time.Time {}

// timeToMsDosTime converts a time.Time to an MS-DOS date and time.
// The resolution is 2s.
// See: https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-filetimetodosdatetime
func timeToMsDosTime(t time.Time) (fDate uint16, fTime uint16) {}

// ModTime returns the modification time in UTC using the legacy
// [ModifiedDate] and [ModifiedTime] fields.
//
// Deprecated: Use [Modified] instead.
func (h *FileHeader) ModTime() time.Time {}

// SetModTime sets the [Modified], [ModifiedTime], and [ModifiedDate] fields
// to the given time in UTC.
//
// Deprecated: Use [Modified] instead.
func (h *FileHeader) SetModTime(t time.Time) {}

const s_IFMT

const s_IFSOCK

const s_IFLNK

const s_IFREG

const s_IFBLK

const s_IFDIR

const s_IFCHR

const s_IFIFO

const s_ISUID

const s_ISGID

const s_ISVTX

const msdosDir

const msdosReadOnly

// Mode returns the permission and mode bits for the [FileHeader].
func (h *FileHeader) Mode() (mode fs.FileMode) {}

// SetMode changes the permission and mode bits for the [FileHeader].
func (h *FileHeader) SetMode(mode fs.FileMode) {}

// isZip64 reports whether the file size exceeds the 32 bit limit
func (h *FileHeader) isZip64() bool {}

func (h *FileHeader) hasDataDescriptor() bool {}

func msdosModeToFileMode(m uint32) (mode fs.FileMode) {}

func fileModeToUnixMode(mode fs.FileMode) uint32 {}

func unixModeToFileMode(m uint32) fs.FileMode {}