(key string)
| 64 | } |
| 65 | |
| 66 | func (fs *fsStorage) Get(key string) (content io.ReadCloser, stat Stat, err error) { |
| 67 | filename, err := fs.joinRootSafe(key) |
| 68 | if err != nil { |
| 69 | return |
| 70 | } |
| 71 | file, err := os.Open(filename) |
| 72 | if err != nil && (os.IsNotExist(err) || strings.HasSuffix(err.Error(), "not a directory")) { |
| 73 | err = ErrNotFound |
| 74 | } |
| 75 | if err != nil { |
| 76 | return |
| 77 | } |
| 78 | content = file |
| 79 | stat, err = os.Stat(filename) |
| 80 | return |
| 81 | } |
| 82 | |
| 83 | func (fs *fsStorage) Put(key string, content io.Reader) (err error) { |
| 84 | filename, err := fs.joinRootSafe(key) |
nothing calls this directly
no test coverage detected