(ctx context.Context, path string)
| 40 | } |
| 41 | |
| 42 | func (fio *filesystem) Create(ctx context.Context, path string) (err error) { |
| 43 | str := strings.Split(path, "/") |
| 44 | if len(str) > 1 { |
| 45 | folder := strings.Join(str[0:len(str)-1], "/") |
| 46 | _ = os.MkdirAll(folder, 0o777) |
| 47 | } |
| 48 | |
| 49 | return fio.WriteJSON(ctx, path, []byte("{}")) |
| 50 | } |
| 51 | |
| 52 | func (fio *filesystem) Delete(ctx context.Context, path string) (err error) { |
| 53 | return os.Remove(path) |