File: clonefile.go

package info (click to toggle)
golang-github-rogpeppe-go-internal 1.14.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,188 kB
  • sloc: makefile: 6
file content (10 lines) | stat: -rw-r--r-- 183 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
//go:build unix && !darwin

package testscript

import "os"

// cloneFile makes a clone of a file via a hard link.
func cloneFile(from, to string) error {
	return os.Link(from, to)
}