Documentation ¶
Overview ¶
Package archive provides common low-level utilities for testing archives
- Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.
Index ¶
- func CreateTarWithCustomFiles(tarName string, fileCnt, fileSize int, customFileType, customFileExt string, ...) error
- func CreateTarWithCustomFilesToWriter(w io.Writer, fileCnt, fileSize int, customFileType, customFileExt string, ...) error
- func CreateTarWithRandomFiles(tarName, ext string, fileCnt, fileSize int, duplication bool, ...) error
- func CreateZipWithRandomFiles(zipName string, fileCnt, fileSize int, randomNames []string) error
- func GetFileInfosFromTarBuffer(buffer bytes.Buffer, gzipped bool) ([]os.FileInfo, error)
- func GetFileInfosFromZipBuffer(buffer bytes.Buffer) ([]os.FileInfo, error)
- type FileContent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTarWithRandomFiles ¶
func CreateTarWithRandomFiles(tarName, ext string, fileCnt, fileSize int, duplication bool, recordExts []string, randomNames []string) error
CreateTarWithRandomFiles creates tar with specified number of files. Tar is also gzipped if necessary.
func GetFileInfosFromTarBuffer ¶
GetFileInfosFromTarBuffer returns all file infos contained in buffer which presumably is tar or gzipped tar.
Types ¶
type FileContent ¶
func GetFilesFromTarBuffer ¶
func GetFilesFromTarBuffer(buffer bytes.Buffer, extension string) ([]FileContent, error)
GetFilesFromTarBuffer returns all file infos contained in buffer which presumably is tar or gzipped tar.
Click to show internal directories.
Click to hide internal directories.