From 2aed59e080591ca0e2a41feb5e011332340cf965 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Fri, 30 Mar 2018 22:44:23 +0200 Subject: [PATCH] coreapi: path.Mutable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit License: MIT Signed-off-by: Ɓukasz Magiera This commit was moved from ipfs/interface-go-ipfs-core@bbff408d0ee7a756bce56956d0e72f0a3df6bbbc This commit was moved from ipfs/boxo@620bec8b444b2c41107a2aa8a0ed39062be3b877 --- core/coreiface/path.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/core/coreiface/path.go b/core/coreiface/path.go index 4cfd916de..bb87a6b3b 100644 --- a/core/coreiface/path.go +++ b/core/coreiface/path.go @@ -6,13 +6,25 @@ import ( // 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. -// 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 { // String returns the path as a string. String() string // Namespace returns the first component of the path 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