MCPcopy Create free account
hub / github.com/hpcloud/tail / RenameFile

Method RenameFile

tail_test.go:436–443  ·  view source on GitHub ↗
(oldname string, newname string)

Source from the content-addressed store, hash-verified

434}
435
436func (t TailTest) RenameFile(oldname string, newname string) {
437 oldname = t.path + "/" + oldname
438 newname = t.path + "/" + newname
439 err := os.Rename(oldname, newname)
440 if err != nil {
441 t.Fatal(err)
442 }
443}
444
445func (t TailTest) AppendFile(name string, contents string) {
446 f, err := os.OpenFile(t.path+"/"+name, os.O_APPEND|os.O_WRONLY, 0600)

Callers 1

reOpenFunction · 0.95

Calls 1

FatalMethod · 0.80

Tested by

no test coverage detected