backuptar

package
v0.0.0-...-7b0ec94 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileInfoFromHeader

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

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)

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

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.accesstime: The last access time, as a Filetime expressed as a 64-bit decimal value.

MSWINDOWS.createtime: The creation time, as a Filetime expressed as a 64-bit decimal value.

MSWINDOWS.changetime: The creation time, as a Filetime expressed as a 64-bit decimal value.

MSWINDOWS.writetime: The creation time, as a Filetime expressed as a 64-bit 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