refactor list into ReadDir and use os.FileInfo

This commit is contained in:
Christoph Polcin
2014-10-23 13:15:02 +02:00
parent 542e8e73bc
commit 48d4d0ff90
5 changed files with 69 additions and 69 deletions

View File

@@ -38,10 +38,10 @@ func main() {
path := flag.Args()[0]
switch *m {
case "LIST", "PROPFIND":
if files, err := c.List(path); err == nil {
fmt.Println(len(*files))
for _, f := range *files {
fmt.Println(*f)
if files, err := c.ReadDir(path); err == nil {
fmt.Println(len(files))
for _, f := range files {
fmt.Println(f)
}
} else {
fmt.Println(err)