github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/cmd/pack/pack.go (about) 1 // Copyright 2014 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package main 6 7 import ( 8 "github.com/shogo82148/std/cmd/internal/archive" 9 "github.com/shogo82148/std/io/fs" 10 ) 11 12 // アーカイブは、開いたアーカイブファイルを表します。バックアップを取らずに、常に開始から終了まで順にスキャンされます。 13 type Archive struct { 14 a *archive.Archive 15 files []string 16 pad int 17 matchAll bool 18 } 19 20 // FileLikeは、実際のファイルを必要とせずにテストするために必要なわずかなメソッドを抽象化します。 21 type FileLike interface { 22 Name() string 23 Stat() (fs.FileInfo, error) 24 Read([]byte) (int, error) 25 Close() error 26 }