2020-07-04 22:37:13 -04:00
|
|
|
package d2interface
|
|
|
|
|
|
|
|
// Archive is an abstract representation of a game archive file
|
|
|
|
// For the original Diablo II, archives are always MPQ's, but
|
|
|
|
// OpenDiablo2 can handle any kind of archive file as long as it
|
|
|
|
// implements this interface
|
|
|
|
type Archive interface {
|
|
|
|
Path() string
|
|
|
|
Contains(string) bool
|
|
|
|
Size() uint32
|
2021-01-08 15:46:11 -05:00
|
|
|
Close() error
|
2020-07-04 22:37:13 -04:00
|
|
|
ReadFile(fileName string) ([]byte, error)
|
2020-09-14 14:47:11 -04:00
|
|
|
ReadFileStream(fileName string) (DataStream, error)
|
2020-07-04 22:37:13 -04:00
|
|
|
ReadTextFile(fileName string) (string, error)
|
2021-01-08 15:46:11 -05:00
|
|
|
Listfile() ([]string, error)
|
2020-07-04 22:37:13 -04:00
|
|
|
}
|