Created
February 3, 2018 17:27
-
-
Save mattico/96c5bb7874d0e8ae3d93d5ff7c77d354 to your computer and use it in GitHub Desktop.
Go OneDrive symlink test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
λ ls D:\OneDrive | |
'Application Files' AudioBooks Books desktop.ini Documents 'Email attachments' Music OnDemandTest Pictures Public Videos | |
λ go run test.go | |
2018/02/03 11:25:53 D:\OneDrive | |
2018/02/03 11:25:53 Lr--r--r-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "os" | |
import "path/filepath" | |
import "log" | |
func main() { | |
err := filepath.Walk("D:\\OneDrive", func (path string, info os.FileInfo, err error) error { | |
log.Print(path) | |
log.Print(info.Mode()) | |
return nil | |
}) | |
if err != nil { | |
log.Fatal(err) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment