swarm/api: FUSE read-write support (#13872)

- Moved fuse related code in a new package, swarm/fuse
- Added write support
  - Create new files
  - Delete existing files
  - Append to files (with limitations)
- More test coverage
This commit is contained in:
Zahoor Mohamed
2017-04-12 05:36:02 +05:30
committed by Felix Lange
parent dd37064a15
commit 1d1d988aa7
15 changed files with 1693 additions and 362 deletions

View File

@@ -162,7 +162,7 @@ func (m *ManifestWalker) walk(trie *manifestTrie, prefix string, walkFn WalkFn)
type manifestTrie struct {
dpa *storage.DPA
entries [257]*manifestTrieEntry // indexed by first character of path, entries[256] is the empty path entry
entries [257]*manifestTrieEntry // indexed by first character of basePath, entries[256] is the empty basePath entry
hash storage.Key // if hash != nil, it is stored
}
@@ -340,6 +340,7 @@ func (self *manifestTrie) recalcAndStore() error {
}
list.Entries = append(list.Entries, entry.ManifestEntry)
}
}
manifest, err := json.Marshal(list)