Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bruce Flynn
sftper
Commits
e6dd9d8f
Commit
e6dd9d8f
authored
Oct 04, 2019
by
Bruce Flynn
Browse files
return low-level mode rather than go's version of it
This allows using the standard stat.S_IS* funcs in python
parent
bda03bfd
Changes
1
Hide whitespace changes
Inline
Side-by-side
api.go
View file @
e6dd9d8f
...
...
@@ -182,7 +182,7 @@ type stat struct {
Name
string
`json:"name"`
Size
int64
`json:"size"`
MTime
int64
`json:"mtime"`
Mode
u
int
32
`json:"mode"`
Mode
int
`json:"mode"`
}
// args: abspath glob pattern
...
...
@@ -196,11 +196,12 @@ func (s sftpAPI) doListdir(path string) ([]stat, error) {
}
for
_
,
st
:=
range
infos
{
x
:=
st
.
Sys
()
.
(
*
sftp
.
FileStat
)
stats
=
append
(
stats
,
stat
{
st
.
Name
(),
st
.
Size
(),
st
.
ModTime
()
.
Unix
(),
u
int
32
(
st
.
Mode
()
),
int
(
x
.
Mode
),
})
}
...
...
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