backuptar

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2016 License: MIT Imports: 11 Imported by: 156

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicInfoHeader added in v0.2.0

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.sd: The Win32 security descriptor, in SDDL (string) 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