pkg.re/essentialkaos/ek@v12.36.0+incompatible/path/path_windows.go (about) 1 // +build windows 2 3 // Package path provides methods for working with paths (fully compatible with base path package) 4 package path 5 6 // ////////////////////////////////////////////////////////////////////////////////// // 7 // // 8 // Copyright (c) 2021 ESSENTIAL KAOS // 9 // Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> // 10 // // 11 // ////////////////////////////////////////////////////////////////////////////////// // 12 13 import ( 14 "errors" 15 ) 16 17 // ////////////////////////////////////////////////////////////////////////////////// // 18 19 //ErrBadPattern indicates a globbing pattern was malformed 20 var ErrBadPattern = errors.New("syntax error in pattern") 21 22 // ////////////////////////////////////////////////////////////////////////////////// // 23 24 // Base returns the last element of path 25 func Base(path string) string { 26 return "" 27 } 28 29 // Clean returns the shortest path name equivalent to path by purely lexical processing 30 func Clean(path string) string { 31 return "" 32 } 33 34 // Dir returns all but the last element of path, typically the path's directory 35 func Dir(path string) string { 36 return "" 37 } 38 39 // DirN returns first N elements of path 40 func DirN(path string, n int) string { 41 return "" 42 } 43 44 // Ext returns the file name extension used by path 45 func Ext(path string) string { 46 return "" 47 } 48 49 // IsAbs reports whether the path is absolute 50 func IsAbs(path string) bool { 51 return false 52 } 53 54 // Join joins any number of path elements into a single path, adding a separating slash if necessary 55 func Join(elem ...string) string { 56 return "" 57 } 58 59 // Match reports whether name matches the shell file name pattern 60 func Match(pattern, name string) (matched bool, err error) { 61 return false, nil 62 } 63 64 // Split splits path immediately following the final slash, separating it into a directory and file name component 65 func Split(path string) (dir, file string) { 66 return "", "" 67 } 68 69 // IsSafe return true is given path is safe to use (not points to system dirs) 70 func IsSafe(path string) bool { 71 return false 72 } 73 74 // IsDotfile return true if filename begins with a full stop 75 func IsDotfile(path string) bool { 76 return false 77 } 78 79 // IsGlob returns true if given pattern is Unix-like glob 80 func IsGlob(pattern string) bool { 81 return false 82 }