Documentation ¶
Index ¶
- 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 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 ¶
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.