// Add append file to remove on error
173098
func (d *FileDefer) Add(file filesystem.File) {
	d.files = append(d.files, file)
}
209512
func (b *Buffer) Append(c ...Chunk) {
	for _, chunk := range c {
		b.appendChunk(chunk)
	}
}
401400
func (fl *FileLedger) Append(block *cb.Block) error {
	err := fl.blockStore.AddBlock(block)
	if err == nil {
		close(fl.signal)
		fl.signal = make(chan struct{})
	}
	return err
}
142195
func (e *Errors) Append(err *Errors) error {
	if err == nil {
		return nil
	}

	e.m.Lock()

	// append Errors at the end of the current list
	e.err = append(e.err, err.err...)

	// set highest priority
	if err.p > e.p {
		e.p = err.p
	}

	e.m.Unlock()
	return nil
}
1296288
func (es *MultiError) Add(err error) {
	if err == nil {
		return
	}
	if merr, ok := err.(MultiError); ok {
		*es = append(*es, merr...)
	} else {
		*es = append(*es, err)
	}
}
810025
func (d *Data) AddFile(key string, file *multipart.FileHeader) {
	d.Files[key] = file
}
830113
func (errs Errors) Add(newErrors ...error) Errors {
	for _, err := range newErrors {
		if err == nil {
			continue
		}

		if errors, ok := err.(Errors); ok {
			errs = errs.Add(errors...)
		} else {
			ok = true
			for _, e := range errs {
				if err == e {
					ok = false
				}
			}
			if ok {
				errs = append(errs, err)
			}
		}
	}
	return errs
}
77260
func Append(e error, msg string) Error {
	if e == nil {
		return nil
	}
	return WrapSkipping(e, 1).Append(msg)
}
803440
func (b *MultiErrorBuilder) Add(err error) {
	// Do not add nil values.
	if err == nil {
		return
	}

	b.errors = append(b.errors, err)
}
100985
func (f *Folder) AddFile(name string, contentType string) error {
	return f.addFile(strings.Split(name, sep), contentType)
}
680674
func Append(err error, str string) error {
	return errors.New(fmt.Sprint(err) + str)
}
317539
func (file *File) Abort() (err error) {
	if file.closed {
		err = errors.New("abort on closed file")
		return
	}
	if file.aborted {
		err = errors.New("abort on aborted file")
		return
	}

	file.tmpfile.Close()
	err = os.Remove(file.tmpfile.Name())
	file.aborted = true
	return
}
658758
func (errs *Errors) AddError(errors ...error) {
	for _, err := range errors {
		if err != nil {
			if e, ok := err.(errorsInterface); ok {
				errs.errors = append(errs.errors, e.GetErrors()...)
			} else {
				errs.errors = append(errs.errors, err)
			}
		}
	}
}
200442
func (f Form) Append(out []byte, src ...byte) []byte {
	return f.doAppend(out, inputBytes(src), len(src))
}
1077228
func (z *ZipArchive) AddFile(fileName, absPath string) error {
	if cae.IsFilter(absPath) {
		return nil
	}

	f, err := os.Open(absPath)
	if err != nil {
		return err
	}
	defer f.Close()

	fi, err := f.Stat()
	if err != nil {
		return err
	}

	file := new(File)
	file.FileHeader, err = zip.FileInfoHeader(fi)
	if err != nil {
		return err
	}
	file.Name = fileName
	file.absPath = absPath

	z.AddEmptyDir(path.Dir(fileName))

	isExist := false
	for _, f := range z.files {
		if fileName == f.Name {
			f = file
			isExist = true
			break
		}
	}
	if !isExist {
		z.files = append(z.files, file)
	}

	z.updateStat()
	return nil
}
654082
func addFile(w *multipart.Writer, fieldName, path string) error {
	file, err := os.Open(path)
	if err != nil {
		return err
	}
	defer file.Close()

	part, err := w.CreateFormFile(fieldName, filepath.Base(path))
	if err != nil {
		return err
	}
	_, err = io.Copy(part, file)

	return err
}
136785
func (sm *SyncMultiError) Append(err error) {
	sm.Lock()
	defer sm.Unlock()
	sm.MultiError = append(sm.MultiError, err)
}