backuptar

package
v1.3.0-alpha.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicInfoHeader

func BasicInfoHeader(name string, size int64, fileInfo *winio.FileBasicInfo) *tar.Header

BasicInfoHeader creates a tar header from basic file information.

func FileInfoFromHeader

func FileInfoFromHeader(hdr *tar.Header) (name string, size int64, fileInfo *winio.FileBasicInfo, err error)

FileInfoFromHeader retrieves basic Win32 file information from a tar header, using the additional metadata written by WriteTarFileFromBackupStream.

func WriteBackupStreamFromTarFile

func WriteBackupStreamFromTarFile(w io.Writer, t *tar.Reader, hdr *tar.Header) (*tar.Header, error)

WriteBackupStreamFromTarFile writes a Win32 backup stream from the current tar file. Since this function may process multiple tar file entries in order to collect all the alternate data streams for the file, it returns the next tar file that was not processed, or io.EOF is there are no more.

func WriteTarFileFromBackupStream

func WriteTarFileFromBackupStream(t *tar.Writer, r io.Reader, name string, size int64, fileInfo *winio.FileBasicInfo) error

WriteTarFileFromBackupStream writes a file to a tar writer using data from a Win32 backup stream.

This encodes Win32 metadata as tar pax vendor extensions starting with MSWINDOWS.

The additional Win32 metadata is:

MSWINDOWS.fileattr: The Win32 file attributes, as a decimal value

MSWINDOWS.rawsd: The Win32 security descriptor, in raw binary format

MSWINDOWS.mountpoint: If present, this is a mount point and not a symlink, even though the type is '2' (symlink)

Types

This section is empty.

Jump to

Keyboard shortcuts

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