Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
interface-go-dms3-core
Commits
cb84af4b
Commit
cb84af4b
authored
Oct 03, 2018
by
Łukasz Magiera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coreapi unixfs: hidden opiton
License: MIT Signed-off-by:
Łukasz Magiera
<
magik6k@gmail.com
>
parent
b977abfc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
options/unixfs.go
options/unixfs.go
+12
-2
No files found.
options/unixfs.go
View file @
cb84af4b
...
@@ -33,6 +33,7 @@ type UnixfsAddSettings struct {
...
@@ -33,6 +33,7 @@ type UnixfsAddSettings struct {
Local
bool
Local
bool
Wrap
bool
Wrap
bool
Hidden
bool
}
}
type
UnixfsAddOption
func
(
*
UnixfsAddSettings
)
error
type
UnixfsAddOption
func
(
*
UnixfsAddSettings
)
error
...
@@ -55,6 +56,7 @@ func UnixfsAddOptions(opts ...UnixfsAddOption) (*UnixfsAddSettings, cid.Prefix,
...
@@ -55,6 +56,7 @@ func UnixfsAddOptions(opts ...UnixfsAddOption) (*UnixfsAddSettings, cid.Prefix,
Local
:
false
,
Local
:
false
,
Wrap
:
false
,
Wrap
:
false
,
Hidden
:
false
,
}
}
for
_
,
opt
:=
range
opts
{
for
_
,
opt
:=
range
opts
{
...
@@ -215,3 +217,11 @@ func (unixfsOpts) Wrap(wrap bool) UnixfsAddOption {
...
@@ -215,3 +217,11 @@ func (unixfsOpts) Wrap(wrap bool) UnixfsAddOption {
return
nil
return
nil
}
}
}
}
// Hidden enables adding of hidden files (files prefixed with '.')
func
(
unixfsOpts
)
Hidden
(
hidden
bool
)
UnixfsAddOption
{
return
func
(
settings
*
UnixfsAddSettings
)
error
{
settings
.
Hidden
=
hidden
return
nil
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment