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

Method CreateFile

tail_test.go:422–427  ·  view source on GitHub ↗
(name string, contents string)

Source from the content-addressed store, hash-verified

420}
421
422func (t TailTest) CreateFile(name string, contents string) {
423 err := ioutil.WriteFile(t.path+"/"+name, []byte(contents), 0600)
424 if err != nil {
425 t.Fatal(err)
426 }
427}
428
429func (t TailTest) RemoveFile(name string) {
430 err := os.Remove(t.path + "/" + name)

Callers 15

TestWaitsForFileToExistFunction · 0.95
TestStopAtEOFFunction · 0.95
TestOver4096ByteLineFunction · 0.95
TestLocationFullFunction · 0.95
TestLocationEndFunction · 0.95
TestLocationMiddleFunction · 0.95
TestRateLimitingFunction · 0.95
TestTellFunction · 0.95
TestBlockUntilExistsFunction · 0.95
maxLineSizeFunction · 0.95

Calls 1

FatalMethod · 0.80

Tested by

no test coverage detected