Documentation ¶
Overview ¶
Package ISO9660 implements a basic reader for the ISO9660 filesystem. Extensions such as Joliet or Rock Ridge is not implemented.
Index ¶
- Variables
- type Buffer
- type File
- func (f *File) Close() error
- func (f *File) Name() string
- func (f *File) Read(p []byte) (n int, err error)
- func (f *File) ReadAt(p []byte, off int64) (n int, err error)
- func (f *File) Readdir(n int) (fi []os.FileInfo, err error)
- func (f *File) Readdirnames(n int) (names []string, err error)
- func (f *File) Seek(off int64, whence int) (int64, error)
- func (f *File) Stat() (fi os.FileInfo, err error)
- type FileSystem
- type Image
- type MultiFile
- type Reader
Constants ¶
This section is empty.
Variables ¶
var ( ErrIsDir = errors.New("is a directory") ErrNotDir = errors.New("not a directory") )
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
Buffer is an interface providing a method to get the length of the buffer and random access to it.
type File ¶
type File struct {
// contains filtered or unexported fields
}
File represents a directory entry inside an ISO.
func (*File) Readdirnames ¶
Readdirnames reads a directory and returns up to n names in the directory. Use n <= 0 to get all the names.
type FileSystem ¶
type FileSystem struct {
// contains filtered or unexported fields
}
FileSystem represents a ISO9660 file system.
func NewFileSystem ¶
func NewFileSystem(r Reader) (*FileSystem, error)
NewFileSystem makes a FileSystem from a Reader
func Open ¶
func Open(name ...string) (*FileSystem, error)
Open creates an ISO9660 filesystem out of OS files.
func (*FileSystem) Chdir ¶
func (fs *FileSystem) Chdir(dir string) error
Chdir changes the filesystem current working directory. There will be an error returned if it is not a valid directory.
func (*FileSystem) Close ¶
func (fs *FileSystem) Close() error
Close closes the reader that the filesystem is using.
func (*FileSystem) Getwd ¶
func (fs *FileSystem) Getwd() (string, error)
Getwd gets the current working directory.
type Image ¶
type Image struct { Buffer // contains filtered or unexported fields }
An Image represents a CD image that treats a Buffer as if it was composed of sectors.
func NewImage ¶
NewImage makes an image out of a Buffer. Image turns a buffer into a run of sectors, like a conventional CD image would be composed of.
func (*Image) NumSectors ¶
NumSectors returns the number of sectors the image contains.
func (*Image) ReadSector ¶
ReadSector reads the sector lba and stores it into the buffer. Use the SectorSize to determine how big the buffer should be.
func (*Image) SectorSize ¶
SectorSize returns the sector size of the image.
type MultiFile ¶
type MultiFile struct {
// contains filtered or unexported fields
}
MultiFile creates concatenation out of a list files and treats them as one contiguous file.
func NewMultiFile ¶
NewMultiFile makes a MultiFile out of a set of the OS files. It will treat the inorder list of files as one contiguous buffer.