MCPcopy Create free account
hub / github.com/dinofizz/diskplayer / writeToDisk

Function writeToDisk

recorder.go:48–58  ·  view source on GitHub ↗

writeToDisk takes a string containing a Spotify URI and writes to the the filepath specified in the diskplayer.yaml configuration file under the recorder.file_path field. Returns an error if one is encountered.

(spotifyUri, fullPath string)

Source from the content-addressed store, hash-verified

46// configuration file under the recorder.file_path field.
47// Returns an error if one is encountered.
48func writeToDisk(spotifyUri, fullPath string) error {
49
50 b := []byte(spotifyUri)
51 err := ioutil.WriteFile(fullPath, b, 0644)
52 if err != nil {
53 return err
54 }
55
56
57 return nil
58}

Callers 1

RecordFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected