Documentation ¶
Index ¶
- func BasicInfoHeader(name string, size int64, fileInfo *winio.FileBasicInfo) *tar.Header
- func FileInfoFromHeader(hdr *tar.Header) (name string, size int64, fileInfo *winio.FileBasicInfo, err error)
- func WriteBackupStreamFromTarFile(w io.Writer, t *tar.Reader, hdr *tar.Header) (*tar.Header, error)
- func WriteTarFileFromBackupStream(t *tar.Writer, r io.Reader, name string, size int64, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BasicInfoHeader ¶ added in v0.2.0
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 ¶
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.