wim

package
v0.0.0-...-3899d99 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2016 License: MIT, Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package wim implements a WIM file parser.

WIM files are used to distribute Windows file system and container images. They are documented at https://msdn.microsoft.com/en-us/library/windows/desktop/dd861280.aspx.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	FileHeader
	Streams []*Stream
	// contains filtered or unexported fields
}

File represents a file or directory in a WIM image.

func (*File) Open

func (f *File) Open() (io.ReadCloser, error)

Open returns an io.ReadCloser that can be used to read the file's contents.

func (*File) Readdir

func (f *File) Readdir() ([]*File, error)

Readdir reads the directory entries.

type FileHeader

type FileHeader struct {
	Name               string
	ShortName          string
	Attributes         uint32
	SecurityDescriptor []byte
	CreationTime       syscall.Filetime
	LastAccessTime     syscall.Filetime
	LastWriteTime      syscall.Filetime
	Hash               SHA1Hash
	Size               int64
	LinkID             int64
	ReparseTag         uint32
	ReparseReserved    uint32
	ReparseStream      *Stream
}

FileHeader contains file metadata.

type Image

type Image struct {
	// contains filtered or unexported fields
}

Image represents an image within a WIM file.

func (*Image) Open

func (img *Image) Open() (*File, error)

Open parses the image and returns the root directory.

type ParseError

type ParseError struct {
	Oper string
	Err  error
}

ParseError is returned when the WIM cannot be parsed.

func (*ParseError) Error

func (e *ParseError) Error() string

type Reader

type Reader struct {
	Image []*Image // The WIM's images.
	// contains filtered or unexported fields
}

Reader provides functions to read a WIM file.

func NewReader

func NewReader(f io.ReaderAt) (*Reader, error)

NewReader returns a Reader that can be used to read WIM file data.

func (*Reader) ReadXML

func (r *Reader) ReadXML() (string, error)

ReadXML reads the XML metadata from a WIM.

type SHA1Hash

type SHA1Hash [20]byte

SHA1Hash contains the SHA1 hash of a file or stream.

type Stream

type Stream struct {
	StreamHeader
	// contains filtered or unexported fields
}

Stream represents an alternate data stream or reparse point data stream.

func (*Stream) Open

func (s *Stream) Open() (io.ReadCloser, error)

Open returns an io.ReadCloser that can be used to read the stream's contents.

type StreamHeader

type StreamHeader struct {
	Name string
	Hash SHA1Hash
	Size int64
}

StreamHeader contains alternate data stream metadata.

Directories

Path Synopsis
Package lzx implements a decompressor for the the WIM variant of the LZX compression algorithm.
Package lzx implements a decompressor for the the WIM variant of the LZX compression algorithm.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL