github.com/enetx/g@v1.0.80/examples/dirs/dirs_copy.go (about)

     1  package main
     2  
     3  import "github.com/enetx/g"
     4  
     5  func main() {
     6  	// Copy the contents of the current directory to a new directory named "copy".
     7  	g.NewDir(".").Copy("copy").Unwrap()
     8  
     9  	// Copy the contents of the current directory to a new directory named "copy" while ignoring symbolic links.
    10  	g.NewDir(".").Copy("copy", false).Unwrap()
    11  }