Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
G
go-ipfs
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
jihao
go-ipfs
Commits
b17506a1
提交
b17506a1
authored
6月 03, 2016
作者:
Jakub Sztandera
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make primary option the longer one
License: MIT Signed-off-by:
Jakub Sztandera
<
kubuxu@protonmail.ch
>
上级
d9d0446d
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
11 行增加
和
11 行删除
+11
-11
active.go
core/commands/active.go
+1
-1
files.go
core/commands/files/files.go
+9
-9
patch.go
core/commands/object/patch.go
+1
-1
没有找到文件。
core/commands/active.go
浏览文件 @
b17506a1
...
...
@@ -22,7 +22,7 @@ Lists running and recently run commands.
res
.
SetOutput
(
req
.
InvocContext
()
.
ReqLog
.
Report
())
},
Options
:
[]
cmds
.
Option
{
cmds
.
BoolOption
(
"v
"
,
"verbose
"
,
"Print extra information."
)
.
Default
(
false
),
cmds
.
BoolOption
(
"v
erbose"
,
"v
"
,
"Print extra information."
)
.
Default
(
false
),
},
Subcommands
:
map
[
string
]
*
cmds
.
Command
{
"clear"
:
clearInactiveCmd
,
...
...
core/commands/files/files.go
浏览文件 @
b17506a1
...
...
@@ -40,7 +40,7 @@ operations.
`
,
},
Options
:
[]
cmds
.
Option
{
cmds
.
BoolOption
(
"f
"
,
"flush
"
,
"Flush target and ancestors after write. Default: true."
),
cmds
.
BoolOption
(
"f
lush"
,
"f
"
,
"Flush target and ancestors after write. Default: true."
),
},
Subcommands
:
map
[
string
]
*
cmds
.
Command
{
"read"
:
FilesReadCmd
,
...
...
@@ -397,8 +397,8 @@ Examples:
cmds
.
StringArg
(
"path"
,
true
,
false
,
"Path to file to be read."
),
},
Options
:
[]
cmds
.
Option
{
cmds
.
IntOption
(
"o
"
,
"offset
"
,
"Byte offset to begin reading from."
),
cmds
.
IntOption
(
"
n"
,
"count
"
,
"Maximum number of bytes to read."
),
cmds
.
IntOption
(
"o
ffset"
,
"o
"
,
"Byte offset to begin reading from."
),
cmds
.
IntOption
(
"
count"
,
"n
"
,
"Maximum number of bytes to read."
),
},
Run
:
func
(
req
cmds
.
Request
,
res
cmds
.
Response
)
{
n
,
err
:=
req
.
InvocContext
()
.
GetNode
()
...
...
@@ -565,10 +565,10 @@ stat' on the file or any of its ancestors.
cmds
.
FileArg
(
"data"
,
true
,
false
,
"Data to write."
)
.
EnableStdin
(),
},
Options
:
[]
cmds
.
Option
{
cmds
.
IntOption
(
"o
"
,
"offset
"
,
"Byte offset to begin writing at."
),
cmds
.
BoolOption
(
"
e"
,
"creat
e"
,
"Create the file if it does not exist."
),
cmds
.
BoolOption
(
"t
"
,
"truncate
"
,
"Truncate the file to size zero before writing."
),
cmds
.
IntOption
(
"
n"
,
"count
"
,
"Maximum number of bytes to read."
),
cmds
.
IntOption
(
"o
ffset"
,
"o
"
,
"Byte offset to begin writing at."
),
cmds
.
BoolOption
(
"
create"
,
"
e"
,
"Create the file if it does not exist."
),
cmds
.
BoolOption
(
"t
runcate"
,
"t
"
,
"Truncate the file to size zero before writing."
),
cmds
.
IntOption
(
"
count"
,
"n
"
,
"Maximum number of bytes to read."
),
},
Run
:
func
(
req
cmds
.
Request
,
res
cmds
.
Response
)
{
path
,
err
:=
checkPath
(
req
.
Arguments
()[
0
])
...
...
@@ -678,7 +678,7 @@ Examples:
cmds
.
StringArg
(
"path"
,
true
,
false
,
"Path to dir to make."
),
},
Options
:
[]
cmds
.
Option
{
cmds
.
BoolOption
(
"p
"
,
"parents
"
,
"No error if existing, make parent directories as needed."
),
cmds
.
BoolOption
(
"p
arents"
,
"p
"
,
"No error if existing, make parent directories as needed."
),
},
Run
:
func
(
req
cmds
.
Request
,
res
cmds
.
Response
)
{
n
,
err
:=
req
.
InvocContext
()
.
GetNode
()
...
...
@@ -758,7 +758,7 @@ Remove files or directories.
cmds
.
StringArg
(
"path"
,
true
,
true
,
"File to remove."
),
},
Options
:
[]
cmds
.
Option
{
cmds
.
BoolOption
(
"r
"
,
"recursive
"
,
"Recursively remove directories."
),
cmds
.
BoolOption
(
"r
ecursive"
,
"r
"
,
"Recursively remove directories."
),
},
Run
:
func
(
req
cmds
.
Request
,
res
cmds
.
Response
)
{
nd
,
err
:=
req
.
InvocContext
()
.
GetNode
()
...
...
core/commands/object/patch.go
浏览文件 @
b17506a1
...
...
@@ -251,7 +251,7 @@ to a file containing 'bar', and returns the hash of the new object.
cmds
.
StringArg
(
"ref"
,
true
,
false
,
"IPFS object to add link to."
),
},
Options
:
[]
cmds
.
Option
{
cmds
.
BoolOption
(
"
p"
,
"create
"
,
"Create intermediary nodes."
)
.
Default
(
false
),
cmds
.
BoolOption
(
"
create"
,
"p
"
,
"Create intermediary nodes."
)
.
Default
(
false
),
},
Run
:
func
(
req
cmds
.
Request
,
res
cmds
.
Response
)
{
nd
,
err
:=
req
.
InvocContext
()
.
GetNode
()
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论