diff options
author | Santiago M. Mola <santi@mola.io> | 2016-10-24 15:22:17 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-10-24 15:22:17 +0200 |
commit | cad256efb13b9067c2664001d5713507694bc411 (patch) | |
tree | b0b9c0653432865483c69e2cbc78c1f51718228b /utils/fs/os | |
parent | d45eb0402b2f3dace2ed1f91ee53e2c591a7ba3c (diff) | |
download | go-git-cad256efb13b9067c2664001d5713507694bc411.tar.gz |
utils/fs: add Remove(). (#94)
Diffstat (limited to 'utils/fs/os')
-rw-r--r-- | utils/fs/os/os.go | 5 |
1 files changed, 5 insertions, 0 deletions
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 { |