mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-02 17:27:23 -04:00
0a72ccaf16
* archive abstraction * archive manager abstraction * fixinglint errors * archive abstraction * archive manager abstraction * fixinglint errors
18 lines
548 B
Go
18 lines
548 B
Go
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
|
|
Close()
|
|
FileExists(fileName string) bool
|
|
ReadFile(fileName string) ([]byte, error)
|
|
ReadFileStream(fileName string) (ArchiveDataStream, error)
|
|
ReadTextFile(fileName string) (string, error)
|
|
GetFileList() ([]string, error)
|
|
}
|