// Archive compresses a file/directory to a writer
//
// If the path ends with a separator, then the contents of the folder at that path
// are at the root level of the archive, otherwise, the root of the archive contains
// the folder as its only item (with contents inside).
//
// If progress is not nil, it is called for each file added to the archive.
Archive compresses a file/directory to a writer

If the path ends with a separator, then the contents of the folder at that path
are at the root level of the archive, otherwise, the root of the archive contains
the folder as its only item (with contents inside).

If progress is not nil, it is called for each file added to the archive.
// Archive compresses a file / directory to a writer // // If the path ends with a separator then the contents of the folder at that path // are at the root level of the archive otherwise the root of the archive contains // the folder as its only item ( with contents inside ) . // // If progress is not nil it is called for each file added to the archive .
func Archive(inFilePath string, writer io.Writer, metadataFilter *types.Metadata) error {
	return archiveWithFilter(inFilePath, writer, func(relativePath string) bool {
		if metadataFilter != nil {
			if !(*metadataFilter).FilterMetadataItem(relativePath) {
				return false
			}
		}
		return true 
	})
}
func Archive ( inFilePath string , writer io . Writer , metadataFilter * types . Metadata ) error { return archiveWithFilter ( inFilePath , writer , func ( relativePath string ) bool { if metadataFilter != nil { if ! ( * metadataFilter ) . FilterMetadataItem ( relativePath ) { return false } } return true } ) }
Archive compresses a file/directory to a writer
Archive compresses a file / directory to a writer
// if there was a metadata filter, apply it. // If our file does not meet our filter criteria, just skip this file