remove separate file for posix utils. (#5948)

This commit is contained in:
Bala FA
2018-06-07 12:31:40 +05:30
committed by Nitish Tiwari
parent 6138cae8e7
commit 6a8bfcef1c
7 changed files with 69 additions and 131 deletions

View File

@@ -42,6 +42,21 @@ const (
maxAllowedIOError = 5
)
// isValidVolname verifies a volname name in accordance with object
// layer requirements.
func isValidVolname(volname string) bool {
if len(volname) < 3 {
return false
}
if runtime.GOOS == "windows" {
// Volname shouldn't have reserved characters in Windows.
return !strings.ContainsAny(volname, `\:*?\"<>|`)
}
return true
}
// posix - implements StorageAPI interface.
type posix struct {
// Disk usage metrics