- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for IsPathClean (0.26 sec)
-
pkg/util/filesystem/util.go
limitations under the License. */ package filesystem import ( "path/filepath" ) // IsPathClean will replace slashes to Separator (which is OS-specific). // This will make sure that all slashes are the same before comparing. func IsPathClean(path string) bool { return filepath.ToSlash(filepath.Clean(path)) == filepath.ToSlash(path)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 10 17:13:59 UTC 2024 - 876 bytes - Viewed (0) -
pkg/util/filesystem/util_test.go
{path: "\\var\\.\\lib\\something", expected: false}, {path: "C:\\var\\.\\lib\\something", expected: false}, }...) } for _, tc := range cases { actual := IsPathClean(tc.path) if actual != tc.expected { t.Errorf("actual: %t, expected: %t, for path: %s\n", actual, tc.expected, tc.path) } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 10 17:13:59 UTC 2024 - 3.8K bytes - Viewed (0) -
pkg/kubelet/apis/config/validation/validation.go
} if !utilfs.IsAbs(kc.PodLogsDir) { allErrors = append(allErrors, fmt.Errorf("invalid configuration: pod logs path %q must be absolute path", kc.PodLogsDir)) } if !utilfs.IsPathClean(kc.PodLogsDir) { allErrors = append(allErrors, fmt.Errorf("invalid configuration: pod logs path %q must be normalized", kc.PodLogsDir)) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 10 17:13:59 UTC 2024 - 18.2K bytes - Viewed (0)