feat: Implement Remove and RemoveAll
This commit is contained in:
@@ -150,10 +150,6 @@ func (f *File) WriteString(s string) (ret int, err error) {
|
||||
func (f *File) closeWithoutLocking() error {
|
||||
log.Println("File.closeWithoutLocking", f.name)
|
||||
|
||||
if f.info.IsDir() {
|
||||
return ErrIsDirectory
|
||||
}
|
||||
|
||||
if f.reader != nil {
|
||||
if err := f.reader.Close(); err != nil {
|
||||
return err
|
||||
|
||||
@@ -118,13 +118,13 @@ func (f *FileSystem) OpenFile(name string, flag int, perm os.FileMode) (afero.Fi
|
||||
func (f *FileSystem) Remove(name string) error {
|
||||
log.Println("FileSystem.Remove", name)
|
||||
|
||||
panic(ErrNotImplemented)
|
||||
return f.writeOps.Delete(name)
|
||||
}
|
||||
|
||||
func (f *FileSystem) RemoveAll(path string) error {
|
||||
log.Println("FileSystem.RemoveAll", path)
|
||||
|
||||
panic(ErrNotImplemented)
|
||||
return f.writeOps.Delete(path)
|
||||
}
|
||||
|
||||
func (f *FileSystem) Rename(oldname, newname string) error {
|
||||
|
||||
Reference in New Issue
Block a user