Commit e6dd9d8f authored by Bruce Flynn's avatar 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
......@@ -182,7 +182,7 @@ type stat struct {
Name string `json:"name"`
Size int64 `json:"size"`
MTime int64 `json:"mtime"`
Mode uint32 `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(),
uint32(st.Mode()),
int(x.Mode),
})
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment