Documentation
¶
Overview ¶
Track implements playable file (or piece of file) abstraction.
Filesystem package implements abstraction over OS filesystem API.
Index ¶
Constants ¶
const ( // Entries with this type incapsulates playable track objects. TypeTrack = iota // Entries with this type incapsulates directory objects. TypeDirectory = iota )
const (
CueFilesExtension = ".cue"
)
const (
PlaylistName = "*vfs*"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Directory ¶
type Directory struct {
// Full path to the directory.
Filename *Path
// Short name, -- last segment.
Name string
}
Directory represents "real" directory in our virtual FS.
type DirectoryArray ¶
type DirectoryArray []*Directory
DirectoryArray is helper type for manipulating (e. g. sorting) Directory arrays.
type Entry ¶
type Entry struct {
// contains filtered or unexported fields
}
Entry represents any filesystem entry object. For example, it can be playable track, directory, etc.
func NewEntry ¶
NewEntry returns newly created and initialized Entry object. t is the type of the incapsulated object. item is incapsulated object itself.
func (*Entry) Directory ¶
Directory returns Directory object incapsulated by Entry. Before calling this method you should be sure that Entry incapsulates Directory object.
func (*Entry) Track ¶
Track returns Track object incapsulated by Entry. Before calling this method you should be sure that Type returns TypeTrack, otherwise panic will happend.
func (*Entry) TypeString ¶
TypeString returns string representaion of the type.
type Filesystem ¶
type Filesystem struct {
// contains filtered or unexported fields
}
Filesystem structure.
func (*Filesystem) List ¶
func (fs *Filesystem) List() (entries []*Entry, err os.Error)
List returns content of the working directory.
func (*Filesystem) SetWorkingDir ¶
func (fs *Filesystem) SetWorkingDir(dir string) os.Error
SetWorkingDir sets new working directory, -- directory where we are located in.
func (*Filesystem) WorkingDir ¶
func (fs *Filesystem) WorkingDir() string
WorkingDir returns chrootedd current directory where we are located in.
func (*Filesystem) WorkingDirFull ¶
func (fs *Filesystem) WorkingDirFull() string
WorkingDirFull returns not chrooted working directory. Returned value is a full path based on root of the physical FS.
type Path ¶
type Path struct {
// contains filtered or unexported fields
}
Path represents path to the resource of the VFS (file, track, ...) and helps to convert OS FS pathes into root-based VFS ones.
func NewPath ¶
NewPath returns newly initialized Path object for given VFS (based on fs.root) path value.
func NewPathFull ¶
NewPathFull returns newly initialized Path object for given OS-like path value.
type PathArray ¶
type PathArray []*Path
PathArray is helper type for manipulating Path arrays.
type Track ¶
Track represents track (one song) which can be played.
type TrackArray ¶
type TrackArray []*Track
TrackArray is helper type for manipulating Track arrays.