Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
G
go-ipfs
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
jihao
go-ipfs
Commits
af148b3e
提交
af148b3e
authored
2月 04, 2016
作者:
Richard Littauer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Normalised Example heading, added dollar sign to examples
License: MIT Signed-off-by:
Richard Littauer
<
richard.littauer@gmail.com
>
上级
6b76e2a4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
14 行增加
和
13 行删除
+14
-13
config.go
core/commands/config.go
+3
-3
mount_unix.go
core/commands/mount_unix.go
+1
-1
object.go
core/commands/object/object.go
+3
-3
patch.go
core/commands/object/patch.go
+7
-6
没有找到文件。
core/commands/config.go
浏览文件 @
af148b3e
...
@@ -41,15 +41,15 @@ repository.`,
...
@@ -41,15 +41,15 @@ repository.`,
much like 'git config'. The configuration values are stored in a config
much like 'git config'. The configuration values are stored in a config
file inside your IPFS repository.
file inside your IPFS repository.
E
XAMPLES
:
E
xamples
:
Get the value of the 'datastore.path' key:
Get the value of the 'datastore.path' key:
ipfs config datastore.path
$
ipfs config datastore.path
Set the value of the 'datastore.path' key:
Set the value of the 'datastore.path' key:
ipfs config datastore.path ~/.ipfs/datastore
$
ipfs config datastore.path ~/.ipfs/datastore
`
,
`
,
},
},
...
...
core/commands/mount_unix.go
浏览文件 @
af148b3e
...
@@ -43,7 +43,7 @@ You may have to create /ipfs and /ipns before using 'ipfs mount':
...
@@ -43,7 +43,7 @@ You may have to create /ipfs and /ipns before using 'ipfs mount':
> ipfs daemon &
> ipfs daemon &
> ipfs mount
> ipfs mount
E
XAMPLE
:
E
xample
:
# setup
# setup
> mkdir foo
> mkdir foo
...
...
core/commands/object/object.go
浏览文件 @
af148b3e
...
@@ -305,7 +305,7 @@ Data should be in the format specified by the --inputenc flag.
...
@@ -305,7 +305,7 @@ Data should be in the format specified by the --inputenc flag.
Examples:
Examples:
echo '{ "Data": "abc" }' | ipfs object put
$
echo '{ "Data": "abc" }' | ipfs object put
This creates a node with the data "abc" and no links. For an object with links,
This creates a node with the data "abc" and no links. For an object with links,
create a file named node.json with the contents:
create a file named node.json with the contents:
...
@@ -319,9 +319,9 @@ create a file named node.json with the contents:
...
@@ -319,9 +319,9 @@ create a file named node.json with the contents:
} ]
} ]
}
}
and then run
And then run:
ipfs object put node.json
$
ipfs object put node.json
`
,
`
,
},
},
...
...
core/commands/object/patch.go
浏览文件 @
af148b3e
...
@@ -48,7 +48,8 @@ var patchAppendDataCmd = &cmds.Command{
...
@@ -48,7 +48,8 @@ var patchAppendDataCmd = &cmds.Command{
ShortDescription
:
`
ShortDescription
:
`
Append data to what already exists in the data segment in the given object.
Append data to what already exists in the data segment in the given object.
EXAMPLE:
Example:
$ echo "hello" | ipfs object patch $HASH append-data
$ echo "hello" | ipfs object patch $HASH append-data
note: this does not append data to a 'file', it modifies the actual raw
note: this does not append data to a 'file', it modifies the actual raw
...
@@ -113,7 +114,7 @@ var patchSetDataCmd = &cmds.Command{
...
@@ -113,7 +114,7 @@ var patchSetDataCmd = &cmds.Command{
ShortDescription
:
`
ShortDescription
:
`
Set the data of an ipfs object from stdin or with the contents of a file
Set the data of an ipfs object from stdin or with the contents of a file
E
XAMPLE
:
E
xample
:
$ echo "my data" | ipfs object patch $MYHASH set-data
$ echo "my data" | ipfs object patch $MYHASH set-data
`
,
`
,
...
@@ -235,11 +236,11 @@ var patchAddLinkCmd = &cmds.Command{
...
@@ -235,11 +236,11 @@ var patchAddLinkCmd = &cmds.Command{
ShortDescription
:
`
ShortDescription
:
`
Add a merkle-link to the given object and return the hash of the result.
Add a merkle-link to the given object and return the hash of the result.
Example
s
:
Example:
EMPTY_DIR=$(ipfs object new unixfs-dir)
$
EMPTY_DIR=$(ipfs object new unixfs-dir)
BAR=$(echo "bar" | ipfs add -q)
$
BAR=$(echo "bar" | ipfs add -q)
ipfs object patch $EMPTY_DIR add-link foo $BAR
$
ipfs object patch $EMPTY_DIR add-link foo $BAR
This takes an empty directory, and adds a link named foo under it, pointing to
This takes an empty directory, and adds a link named foo under it, pointing to
a file containing 'bar', and returns the hash of the new object.
a file containing 'bar', and returns the hash of the new object.
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论