I have a file which os.open()
gives me back, no such file or directory
. Is there a function which can escape a file name for getting the correct path to it? Something similar to the net package QueryEscape
?, but for file paths of course
Here is the Path name "Music/3OH!3 - Streets Of Gold 2010 [Cov+CD][Bubanee]/06. Touchin On My - 30H!3.mp3"
I'm just using a simple
srcName := "Music/3OH!3 - Streets Of Gold 2010 [Cov+CD][Bubanee]/06. Touchin On My - 30H!3.mp3"
src, err := os.Open(srcName)
if err != nil {
fmt.Println(err)
return
}
The file does exist btw, go just cant follow the path name. The path that bash can follow is Music/3OH\!3\ -\ Streets\ Of\ Gold\ \[Cov+CD\]\[Bubanee\]/12.\ Strrets\ Of\ Gold\ -\ 30H\!3.mp3
which shows all the escaping that is needed.