Skip to content

Instantly share code, notes, and snippets.

@mattico
Created February 3, 2018 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattico/96c5bb7874d0e8ae3d93d5ff7c77d354 to your computer and use it in GitHub Desktop.
Save mattico/96c5bb7874d0e8ae3d93d5ff7c77d354 to your computer and use it in GitHub Desktop.
Go OneDrive symlink test
λ 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--
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