Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Node ¶
type Node struct { Name string Format string // Tracks, Artists, Playlists, Folders Children []*Node // If artist or folders, Children != nil to store playlists and folders Id spotify.ID // If album or playlist, Id != nil to retrieve tracks by ID Num_children int Is_leaf bool // Makes it easier for us to print trees }
Abstraction for tracks, artists, albums, playlists, and folders
func DFS ¶
Runs DFS on given directory and returns the destination NOTE: There's a problem where the node pointer returned is corrupted; that is, within the function scope of DFS, the data exists, but once returned the object is empty. This is most likely due to how we're dealing with pointers (i.e. lack of understanding of Golang), but also might be how we're recursing. Look into the recursive calls via *unit testing*, maybe we need to approach this from a different angle.
type Tree ¶
type Tree struct { Client *spotify.Client // Reference to Spotify client for mounting purposes Cwp *Node // Current working playlist (ls will display children of Cwp) Children []*Node // Subdirectories Num_children int }
Essentially the data structure that represents the filesystem; Navigation and all other stuff will be done on a Tree (see `fs.go`) NOTE: Filesystem should only be done with user library (can maybe try to add saved albums)