diff options
Diffstat (limited to 'hotline/file_store.go')
| -rw-r--r-- | hotline/file_store.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/hotline/file_store.go b/hotline/file_store.go index b56d9a1..c1c3929 100644 --- a/hotline/file_store.go +++ b/hotline/file_store.go @@ -11,6 +11,8 @@ type FileStore interface { Mkdir(name string, perm os.FileMode) error Stat(name string) (os.FileInfo, error) Open(name string) (*os.File, error) + Symlink(oldname, newname string) error + // TODO: implement these //Rename(oldpath string, newpath string) error //RemoveAll(path string) error @@ -30,6 +32,10 @@ func (fs OSFileStore) Open(name string) (*os.File, error) { return os.Open(name) } +func (fs OSFileStore) Symlink(oldname, newname string) error { + return os.Symlink(oldname, newname) +} + type MockFileStore struct { mock.Mock } @@ -52,3 +58,8 @@ func (mfs MockFileStore) Open(name string) (*os.File, error) { args := mfs.Called(name) return args.Get(0).(*os.File), args.Error(1) } + +func (mfs MockFileStore) Symlink(oldname, newname string) error { + args := mfs.Called(oldname, newname) + return args.Error(0) +} |