pkg.re/essentialkaos/ek@v12.36.0+incompatible/fsutil/fs_windows.go (about)

     1  // +build windows
     2  
     3  package fsutil
     4  
     5  // ////////////////////////////////////////////////////////////////////////////////// //
     6  //                                                                                    //
     7  //                         Copyright (c) 2021 ESSENTIAL KAOS                          //
     8  //      Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0>     //
     9  //                                                                                    //
    10  // ////////////////////////////////////////////////////////////////////////////////// //
    11  
    12  import (
    13  	"os"
    14  	"time"
    15  )
    16  
    17  // ////////////////////////////////////////////////////////////////////////////////// //
    18  
    19  const (
    20  	S_IFMT   = 0170000
    21  	S_IFSOCK = 0140000
    22  	S_IFLNK  = 0120000
    23  	S_IFREG  = 0100000
    24  	S_IFBLK  = 0060000
    25  	S_IFDIR  = 0040000
    26  	S_IFCHR  = 0020000
    27  	S_IFIFO  = 0010000
    28  	S_ISUID  = 0004000
    29  	S_ISGID  = 0002000
    30  	S_ISVTX  = 0001000
    31  	S_IRWXU  = 00700
    32  	S_IRUSR  = 00400
    33  	S_IWUSR  = 00200
    34  	S_IXUSR  = 00100
    35  	S_IRWXG  = 00070
    36  	S_IRGRP  = 00040
    37  	S_IWGRP  = 00020
    38  	S_IXGRP  = 00010
    39  	S_IRWXO  = 00007
    40  	S_IROTH  = 00004
    41  	S_IWOTH  = 00002
    42  	S_IXOTH  = 00001
    43  )
    44  
    45  // ////////////////////////////////////////////////////////////////////////////////// //
    46  
    47  // CheckPerms check many props at once
    48  func CheckPerms(perms, path string) bool {
    49  	return false
    50  }
    51  
    52  // ValidatePerms validates permissions for file or directory
    53  func ValidatePerms(props, path string) error {
    54  	return nil
    55  }
    56  
    57  // ProperPath returns the first proper path from a given slice
    58  func ProperPath(props string, paths []string) string {
    59  	return ""
    60  }
    61  
    62  // IsExist returns true if the given object is exist
    63  func IsExist(path string) bool {
    64  	return false
    65  }
    66  
    67  // IsRegular returns true if the given object is a regular file
    68  func IsRegular(path string) bool {
    69  	return false
    70  }
    71  
    72  // IsSocket returns true if the given object is a socket
    73  func IsSocket(path string) bool {
    74  	return false
    75  }
    76  
    77  // IsBlockDevice returns true if the given object is a device
    78  func IsBlockDevice(path string) bool {
    79  	return false
    80  }
    81  
    82  // IsCharacterDevice returns true if the given object is a character device
    83  func IsCharacterDevice(path string) bool {
    84  	return false
    85  }
    86  
    87  // IsDir returns true if the given object is a directory
    88  func IsDir(path string) bool {
    89  	return false
    90  }
    91  
    92  // IsLink returns true if the given object is a link
    93  func IsLink(path string) bool {
    94  	return false
    95  }
    96  
    97  // IsReadable returns true if given object is readable by current user
    98  func IsReadable(path string) bool {
    99  	return false
   100  }
   101  
   102  // IsReadableByUser returns true if given object is readable by some user
   103  func IsReadableByUser(path, userName string) bool {
   104  	return false
   105  }
   106  
   107  // IsWritable returns true if given object is writable by current user
   108  func IsWritable(path string) bool {
   109  	return false
   110  }
   111  
   112  // IsWritableByUser returns true if given object is writable by some user
   113  func IsWritableByUser(path, userName string) bool {
   114  	return false
   115  }
   116  
   117  // IsExecutable returns true if given object is executable by current user
   118  func IsExecutable(path string) bool {
   119  	return false
   120  }
   121  
   122  // IsExecutableByUser returns true if given object is executable by some user
   123  func IsExecutableByUser(path, userName string) bool {
   124  	return false
   125  }
   126  
   127  // IsNonEmpty returns true if given file is not empty
   128  func IsNonEmpty(path string) bool {
   129  	return false
   130  }
   131  
   132  // IsEmptyDir returns true if given directory es empty
   133  func IsEmptyDir(path string) bool {
   134  	return false
   135  }
   136  
   137  // GetOwner returns object owner UID and GID
   138  func GetOwner(path string) (int, int, error) {
   139  	return 0, 0, nil
   140  }
   141  
   142  // GetATime returns time of last access
   143  func GetATime(path string) (time.Time, error) {
   144  	return time.Time{}, nil
   145  }
   146  
   147  // GetCTime returns time of creation
   148  func GetCTime(path string) (time.Time, error) {
   149  	return time.Time{}, nil
   150  }
   151  
   152  // GetMTime returns time of modification
   153  func GetMTime(path string) (time.Time, error) {
   154  	return time.Time{}, nil
   155  }
   156  
   157  // GetSize returns file size in bytes
   158  func GetSize(path string) int64 {
   159  	return -1
   160  }
   161  
   162  // GetMode returns file mode bits
   163  func GetMode(path string) os.FileMode {
   164  	return 0
   165  }
   166  
   167  // GetTimes returns time of access, modification, and creation at once
   168  func GetTimes(path string) (time.Time, time.Time, time.Time, error) {
   169  	return time.Time{}, time.Time{}, time.Time{}, nil
   170  }
   171  
   172  // GetTimestamps returns time of access, modification, and creation at once as unix timestamp
   173  func GetTimestamps(path string) (int64, int64, int64, error) {
   174  	return -1, -1, -1, nil
   175  }