pkg.re/essentialkaos/ek.10@v12.41.0+incompatible/path/path_windows.go (about)

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