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
go-dms3-cmds
Commits
fd84aa98
Commit
fd84aa98
authored
Dec 28, 2015
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename hidden field
License: MIT Signed-off-by:
Jeromy
<
jeromyj@gmail.com
>
parent
0b97387e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
files/serialfile.go
files/serialfile.go
+8
-8
No files found.
files/serialfile.go
View file @
fd84aa98
...
...
@@ -19,7 +19,7 @@ type serialFile struct {
files
[]
os
.
FileInfo
stat
os
.
FileInfo
current
*
File
h
idden
bool
h
andleHiddenFiles
bool
}
func
NewSerialFile
(
name
,
path
string
,
hidden
bool
,
stat
os
.
FileInfo
)
(
File
,
error
)
{
...
...
@@ -70,7 +70,7 @@ func (f *serialFile) NextFile() (File, error) {
stat
:=
f
.
files
[
0
]
f
.
files
=
f
.
files
[
1
:
]
for
!
f
.
h
idden
&&
strings
.
HasPrefix
(
stat
.
Name
(),
"."
)
{
for
!
f
.
h
andleHiddenFiles
&&
strings
.
HasPrefix
(
stat
.
Name
(),
"."
)
{
if
len
(
f
.
files
)
==
0
{
return
nil
,
io
.
EOF
}
...
...
@@ -86,7 +86,7 @@ func (f *serialFile) NextFile() (File, error) {
// recursively call the constructor on the next file
// if it's a regular file, we will open it as a ReaderFile
// if it's a directory, files in it will be opened serially
sf
,
err
:=
NewSerialFile
(
fileName
,
filePath
,
f
.
h
idden
,
stat
)
sf
,
err
:=
NewSerialFile
(
fileName
,
filePath
,
f
.
h
andleHiddenFiles
,
stat
)
if
err
!=
nil
{
return
nil
,
err
}
...
...
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