2017-05-30 17:03:41 +02:00
|
|
|
// +build windows
|
|
|
|
|
|
|
|
package platform
|
|
|
|
|
|
|
|
import(
|
|
|
|
"regexp"
|
|
|
|
)
|
|
|
|
|
2017-05-30 19:54:52 +02:00
|
|
|
func DirOf(filename string) (dirname string, e error) {
|
2017-05-30 20:04:18 +02:00
|
|
|
r, e := regexp.Compile(`\\[^\\]+$`)
|
2017-05-30 19:54:52 +02:00
|
|
|
if e != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
dirname = r.ReplaceAllString(filename, "")
|
|
|
|
return
|
|
|
|
}
|