MCPcopy Index your code
hub / github.com/bitfield/script / AppendFile

Method AppendFile

script.go:204–206  ·  view source on GitHub ↗

AppendFile appends the contents of the pipe to the file path, creating it if necessary, and returns the number of bytes successfully written, or an error.

(path string)

Source from the content-addressed store, hash-verified

202// necessary, and returns the number of bytes successfully written, or an
203// error.
204func (p *Pipe) AppendFile(path string) (int64, error) {
205 return p.writeOrAppendFile(path, os.O_APPEND|os.O_CREATE|os.O_WRONLY)
206}
207
208// Basename reads paths from the pipe, one per line, and removes any leading
209// directory components from each. So, for example, /usr/local/bin/foo would

Calls 1

writeOrAppendFileMethod · 0.95