Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type File ¶ added in v0.0.5
type File struct { FileHeader CountryCode string ProductCode string Identifier string // contains filtered or unexported fields }
A File is a single file within a memory card.
type FileHeader ¶ added in v0.0.5
FileHeader describes a file within a memory card.
func (*FileHeader) FileInfo ¶ added in v0.0.5
func (h *FileHeader) FileInfo() fs.FileInfo
FileInfo returns an fs.FileInfo for the FileHeader.
func (*FileHeader) Mode ¶ added in v0.0.5
func (h *FileHeader) Mode() fs.FileMode
Mode returns the permission and mode bits for the FileHeader.
type ReadCloser ¶ added in v0.0.5
type ReadCloser struct { Reader // contains filtered or unexported fields }
A ReadCloser is a Reader that must be closed when no longer needed.
func OpenReader ¶ added in v0.0.5
func OpenReader(name string) (*ReadCloser, error)
OpenReader will open the memory card image specified by name and return a ReadCloser.
func (*ReadCloser) Close ¶ added in v0.0.5
func (rc *ReadCloser) Close() error
Close closes the memory card image, rendering it unusable for I/O.
type Reader ¶ added in v0.0.5
type Reader struct { File []*File // contains filtered or unexported fields }
A Reader serves content from a memory card image.
type Writer ¶ added in v0.0.5
type Writer struct {
// contains filtered or unexported fields
}
A Writer is used for creating a new memory card image with files written to it.
Example ¶
package main import ( "bytes" "fmt" "github.com/bodgit/psx" ) func main() { buf := new(bytes.Buffer) w, err := psx.NewWriter(buf) if err != nil { panic(err) } if err := w.Close(); err != nil { panic(err) } fmt.Println(buf.Len()) }
Output: 131072
Source Files ¶
Click to show internal directories.
Click to hide internal directories.