summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/spf13/afero/readonlyfs.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/spf13/afero/readonlyfs.go')
-rw-r--r--vendor/github.com/spf13/afero/readonlyfs.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/github.com/spf13/afero/readonlyfs.go b/vendor/github.com/spf13/afero/readonlyfs.go
index c6376ec3..f94b181b 100644
--- a/vendor/github.com/spf13/afero/readonlyfs.go
+++ b/vendor/github.com/spf13/afero/readonlyfs.go
@@ -44,6 +44,18 @@ func (r *ReadOnlyFs) LstatIfPossible(name string) (os.FileInfo, bool, error) {
return fi, false, err
}
+func (r *ReadOnlyFs) SymlinkIfPossible(oldname, newname string) error {
+ return &os.LinkError{Op: "symlink", Old: oldname, New: newname, Err: ErrNoSymlink}
+}
+
+func (r *ReadOnlyFs) ReadlinkIfPossible(name string) (string, error) {
+ if srdr, ok := r.source.(LinkReader); ok {
+ return srdr.ReadlinkIfPossible(name)
+ }
+
+ return "", &os.PathError{Op: "readlink", Path: name, Err: ErrNoReadlink}
+}
+
func (r *ReadOnlyFs) Rename(o, n string) error {
return syscall.EPERM
}