DM
Size: a a a
AT
AT
AT
и
paths := []String{
`C:\Path With Spaces\File`,
`C:\\Path With Spaces\\File`,
`C:/Path With Spaces/File`,
`"C:\Path With Spaces\File"`,
`"C:\\Path With Spaces\\File"`,
`"C:/Path With Spaces/File"`,
}
for p := range paths {
os.Stat(p); // err: CreateFile "<FILE_PATH_HERE>": The filename, directory name, or volume label syntax is incorrect.
}
M
paths := []String{
`C:\Path With Spaces\File`,
`C:\\Path With Spaces\\File`,
`C:/Path With Spaces/File`,
`"C:\Path With Spaces\File"`,
`"C:\\Path With Spaces\\File"`,
`"C:/Path With Spaces/File"`,
}
for p := range paths {
os.Stat(p); // err: CreateFile "<FILE_PATH_HERE>": The filename, directory name, or volume label syntax is incorrect.
}
и
fp := strings.Split(filePath, "/")такое же поведение..
log.Printf("%#v", fp)
fi, err := os.Stat(filepath.Join(fp...))
[]string{"C:", "Some Path", "Some File"}
file check failed: CreateFile C:Some Path\Some File: The system cannot find the path specified.
DP
DP
ЕО
J
DD
DD