Categorygithub.com/turnon/mdir
repositorypackage
0.1.3
Repository: https://github.com/turnon/mdir.git
Documentation: pkg.go.dev

# README

mdir

move files to md5-style path

install

$ go get github.com/turnon/mdir

usage

move files:

cmd := mdir.Cmd{
    Src:      "/path/to/src",
    Dest:     "/path/to/dest",
    Segments: []int{2, 2, 2},
    Force:    true, // actually move files
    CopyFile: true, // copy instead move
}

cmd.MvFiles()

calculate path:

path, err := mdir.PathOfName("river.jpg", 1, 2, 3)