coreapi: path.Mutable
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com> This commit was moved from ipfs/interface-go-ipfs-core@bbff408d0ee7a756bce56956d0e72f0a3df6bbbc This commit was moved from ipfs/boxo@620bec8b444b2c41107a2aa8a0ed39062be3b877
Łukasz Magiera committed
Mar 30, 2018 at 22:44 UTC
2aed59e080591ca0e2a41feb5e011332340cf965
1 file changed
+13
-1
core/coreiface/path.go
+13
-1
@@ -6,13 +6,25 @@ import (
6
7
// Path is a generic wrapper for paths used in the API. A path can be resolved
8
// to a CID using one of Resolve functions in the API.
9
-// TODO: figure out/explain namespaces
9
+//
10
+// Paths must be prefixed with a valid prefix:
11
+//
12
+// * /ipfs - Immutable unixfs path (files)
13
+// * /ipld - Immutable ipld path (data)
14
+// * /ipns - Mutable names. Usually resolves to one of the immutable paths
15
+//TODO: /local (MFS)
16
type Path interface {
17
// String returns the path as a string.
18
String() string
19
20
// Namespace returns the first component of the path
21
Namespace() string
22
+
23
+ // Mutable returns false if the data pointed to by this path in guaranteed
24
+ // to not change.
25
+ //
26
+ // Note that resolved mutable path can be immutable.
27
+ Mutable() bool
28
}
29
30
// ResolvedPath is a resolved Path