Commit bbff408d authored by Łukasz Magiera's avatar Łukasz Magiera

coreapi: path.Mutable

License: MIT
Signed-off-by: default avatarŁukasz Magiera <magik6k@gmail.com>
parent e4a33322
...@@ -6,13 +6,25 @@ import ( ...@@ -6,13 +6,25 @@ import (
// Path is a generic wrapper for paths used in the API. A path can be resolved // Path is a generic wrapper for paths used in the API. A path can be resolved
// to a CID using one of Resolve functions in the API. // to a CID using one of Resolve functions in the API.
// TODO: figure out/explain namespaces //
// Paths must be prefixed with a valid prefix:
//
// * /ipfs - Immutable unixfs path (files)
// * /ipld - Immutable ipld path (data)
// * /ipns - Mutable names. Usually resolves to one of the immutable paths
//TODO: /local (MFS)
type Path interface { type Path interface {
// String returns the path as a string. // String returns the path as a string.
String() string String() string
// Namespace returns the first component of the path // Namespace returns the first component of the path
Namespace() string Namespace() string
// Mutable returns false if the data pointed to by this path in guaranteed
// to not change.
//
// Note that resolved mutable path can be immutable.
Mutable() bool
} }
// ResolvedPath is a resolved Path // ResolvedPath is a resolved Path
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment