Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
package main
import (
"fmt"
"github.com/syncthing/syncthing/lib/fs"
)
func main() {
base := `F:\`
testFs := fs.NewFilesystem(fs.FilesystemTypeBasic, base)
for _, targ := range []string{`FOO`, `FOO\BAR`} {
if err := testFs.MkdirAll(targ, 777); err != nil {
fmt.Printf("Base: %v, target: %v, err: %v", base, targ, err)
}
}
base = `F:\FOO`
testFs = fs.NewFilesystem(fs.FilesystemTypeBasic, base)
for _, targ := range []string{`.`, `BAR`} {
if err := testFs.MkdirAll(targ, 777); err != nil {
fmt.Printf("Base: %v, target: %v, err: %v", base, targ, err)
}
}
base = `F:\FOO\BAR`
testFs = fs.NewFilesystem(fs.FilesystemTypeBasic, base)
targ := `BAR`
if err := testFs.MkdirAll(targ, 777); err != nil {
fmt.Printf("Base: %v, target: %v, err: %v", base, targ, err)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.