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
Hide 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
...
...
@@ -32,7 +32,8 @@ type UnixfsAddSettings struct {
OnlyHash
bool
Local
bool
Wrap
bool
Wrap
bool
Hidden
bool
}
type
UnixfsAddOption
func
(
*
UnixfsAddSettings
)
error
...
...
@@ -54,7 +55,8 @@ func UnixfsAddOptions(opts ...UnixfsAddOption) (*UnixfsAddSettings, cid.Prefix,
OnlyHash
:
false
,
Local
:
false
,
Wrap
:
false
,
Wrap
:
false
,
Hidden
:
false
,
}
for
_
,
opt
:=
range
opts
{
...
...
@@ -215,3 +217,11 @@ func (unixfsOpts) Wrap(wrap bool) UnixfsAddOption {
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