From cad256efb13b9067c2664001d5713507694bc411 Mon Sep 17 00:00:00 2001 From: "Santiago M. Mola" Date: Mon, 24 Oct 2016 15:22:17 +0200 Subject: utils/fs: add Remove(). (#94) --- utils/fs/os/os.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'utils/fs/os/os.go') diff --git a/utils/fs/os/os.go b/utils/fs/os/os.go index 0b0173f..800bd41 100644 --- a/utils/fs/os/os.go +++ b/utils/fs/os/os.go @@ -100,6 +100,11 @@ func (fs *OS) Stat(filename string) (FileInfo, error) { return os.Stat(fullpath) } +func (fs *OS) Remove(filename string) error { + fullpath := fs.Join(fs.base, filename) + return os.Remove(fullpath) +} + func (fs *OS) TempFile(dir, prefix string) (File, error) { fullpath := fs.Join(fs.base, dir) if err := fs.createDir(fullpath + string(os.PathSeparator)); err != nil { -- cgit