| 名称 |
最后提交
|
最后更新 |
|---|---|---|
| .. | ||
| dir.go | ||
| fd.go | ||
| file.go | ||
| mfs_test.go | ||
| ops.go | ||
| repub_test.go | ||
| system.go |
Make `Root` value explicitly a `Directory` structure instead of the `FSNode`
interface (which also allowed the `File` type). This helps to make the code
easier to reason about: the root of an MFS layout is always a directory, not a
(single) file.
Rename `GetValue()` to `GetDirectory()` to also make it more explicit, the
renamed function now returns a `Directory` so there is no need for type
assertions that were previously done on the `FSNode` interface to check that it
was actually a `Directory`.
`NewRoot()` now doesn't allow to create `Root` structures from DAG nodes that
contain UnixFS files.
License: MIT
Signed-off-by:
Lucas Molas <schomatis@gmail.com>
| 名称 |
最后提交
|
最后更新 |
|---|---|---|
| .. | ||
| dir.go | 正在载入提交数据... | |
| fd.go | 正在载入提交数据... | |
| file.go | 正在载入提交数据... | |
| mfs_test.go | 正在载入提交数据... | |
| ops.go | 正在载入提交数据... | |
| repub_test.go | 正在载入提交数据... | |
| system.go | 正在载入提交数据... |