aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/osutil/osutil.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/osutil/osutil.go')
-rw-r--r--pkg/osutil/osutil.go23
1 files changed, 0 insertions, 23 deletions
diff --git a/pkg/osutil/osutil.go b/pkg/osutil/osutil.go
index c9ee98412..8e0ed7ea3 100644
--- a/pkg/osutil/osutil.go
+++ b/pkg/osutil/osutil.go
@@ -145,29 +145,6 @@ func IsExist(name string) bool {
return err == nil
}
-// IsAccessible checks if the file can be opened.
-func IsAccessible(name string) error {
- if !IsExist(name) {
- return fmt.Errorf("%v does not exist", name)
- }
- f, err := os.Open(name)
- if err != nil {
- return fmt.Errorf("%v can't be opened (%w)", name, err)
- }
- f.Close()
- return nil
-}
-
-// IsWritable checks if the file can be written.
-func IsWritable(name string) error {
- f, err := os.OpenFile(name, os.O_WRONLY, DefaultFilePerm)
- if err != nil {
- return fmt.Errorf("%v can't be written (%w)", name, err)
- }
- f.Close()
- return nil
-}
-
// FilesExist returns true if all files exist in dir.
// Files are assumed to be relative names in slash notation.
func FilesExist(dir string, files map[string]bool) bool {