// GetFileContents provides a mock function with given fields: containerID, sourcePath
343327
func (_m *ContainerRuntimeExecutor) GetFileContents(containerID string, sourcePath string) (string, error) {
	ret := _m.Called(containerID, sourcePath)

	var r0 string
	if rf, ok := ret.Get(0).(func(string, string) string); ok {
		r0 = rf(containerID, sourcePath)
	} else {
		r0 = ret.Get(0).(string)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(string, string) error); ok {
		r1 = rf(containerID, sourcePath)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
1150620
func (r *regulator) GetContent(ctx context.Context, path string) ([]byte, error) {
	r.enter()
	defer r.exit()

	return r.StorageDriver.GetContent(ctx, path)
}
1304292
func (h *Handler) GetContent(feed *Feed) (storage.Address, []byte, error) {
	if feed == nil {
		return nil, nil, NewError(ErrInvalidValue, "feed is nil")
	}
	feedUpdate := h.get(feed)
	if feedUpdate == nil {
		return nil, nil, NewError(ErrNotFound, "feed update not cached")
	}
	return feedUpdate.lastKey, feedUpdate.data, nil
}
219277
func (d *driver) GetContent(ctx context.Context, path string) ([]byte, error) {
	reader, err := d.Reader(ctx, path, 0)
	if err != nil {
		return nil, err
	}
	return ioutil.ReadAll(reader)
}
1109582
func getToolContents() (contents []byte, err error) {
	// Get hold of the binary contents, if we haven't yet.
	getToolContents_Once.Do(func() {
		getToolContents_Contents, getToolContents_Err = getToolContentsImpl()
	})

	contents, err = getToolContents_Contents, getToolContents_Err
	return
}
690219
func compareFileContent(p1, p2 string) (bool, error) {
	f1, err := os.Open(p1)
	if err != nil {
		return false, err
	}
	defer f1.Close()
	f2, err := os.Open(p2)
	if err != nil {
		return false, err
	}
	defer f2.Close()

	b1 := make([]byte, compareChuckSize)
	b2 := make([]byte, compareChuckSize)
	for {
		n1, err1 := f1.Read(b1)
		if err1 != nil && err1 != io.EOF {
			return false, err1
		}
		n2, err2 := f2.Read(b2)
		if err2 != nil && err2 != io.EOF {
			return false, err2
		}
		if n1 != n2 || !bytes.Equal(b1[:n1], b2[:n2]) {
			return false, nil
		}
		if err1 == io.EOF && err2 == io.EOF {
			return true, nil
		}
	}
}
559923
func (s *ProjectsService) GetCommitContent(projectName, commitID, fileID string) (string, *Response, error) {
	u := fmt.Sprintf("projects/%s/commits/%s/files/%s/content", url.QueryEscape(projectName), commitID, fileID)
	return getStringResponseWithoutOptions(s.client, u)
}
1269089
func (s SourceFilesystems) IsContent(filename string) bool {
	return s.Content.Contains(filename)
}
1084433
func ReadFileContents(file string) (string, error) {
	if !FileExists(file) {
		return "", fmt.Errorf("File %s doesn't exist.", file)
	}
	bytes, err := ioutil.ReadFile(file)
	if err != nil {
		return "", fmt.Errorf("Failed to read the file %s.", file)
	}
	return strings.TrimLeft(string(bytes), "\xef\xbb\xbf"), nil
}
1295728
func (api *Client) GetMediaFiles() ([]*MediaFile, error) {
	result, _, err := api.makeRequest(http.MethodGet, api.concatUserPath(mediaPath), &[]*MediaFile{})
	if err != nil {
		return nil, err
	}
	return *(result.(*[]*MediaFile)), nil
}
310277
func ContainerChildrenGetAll(
	ctx context.Context,
	client api.Client,
	containerPath string) ([]*ContainerChild, error) {

	var children []*ContainerChild

	cc, ec := ContainerChildrenGetQuery(
		ctx, client, containerPath,
		2, -1, "", "", nil, containerChildrenGetAllDetail)

	done := make(chan int)

	go func() {
		defer close(done)
		for c := range cc {
			children = append(children, c)
		}
	}()

	for {
		select {
		case <-done:
			return children, nil
		case e := <-ec:
			if e != nil {
				return nil, e
			}
		}
	}
}
1216378
func (f *File) ReadContent() error {
	if len(f.Content) == 0 {
		content, err := ioutil.ReadFile(path.Join(f.Path, f.FileName))
		if err != nil {
			return err
		}
		f.Content = content
	}
	return nil
}
1063070
func (r *ReleaseAsset) GetContentType() string {
	if r == nil || r.ContentType == nil {
		return ""
	}
	return *r.ContentType
}
1167597
func (b *Bucket) GetBucketContents() (*map[string]Key, error) {
	bucketContents := map[string]Key{}
	prefix := ""
	pathSeparator := ""
	marker := ""
	for {
		contents, err := b.List(prefix, pathSeparator, marker, 1000)
		if err != nil {
			return &bucketContents, err
		}
		for _, key := range contents.Contents {
			bucketContents[key.Key] = key
		}
		if contents.IsTruncated {
			marker = contents.NextMarker
		} else {
			break
		}
	}

	return &bucketContents, nil
}
796269
func (mock *Mock) GetFileNames(paths []string) ([]string, error) {
	items := mock.getReturnValues("GetFileNames")
	if len(items) == 1 {
		switch typed := items[0].(type) {
		case []string:
			return typed, nil
		case error:
			return []string{}, typed
		}
	} else if len(items) == 2 {
		return items[0].([]string), items[1].(error)
	}
	return []string{}, nil
}
293395
func (c *Client) FileHasContents(ctx context.Context, f, wholeRef blob.Ref) bool {
	if err := c.condDiscovery(); err != nil {
		return false
	}
	if c.downloadHelper == "" {
		return false
	}
	req := c.newRequest(ctx, "HEAD", c.downloadHelper+f.String()+"/?verifycontents="+wholeRef.String())
	res, err := c.expect2XX(req)
	if err != nil {
		log.Printf("download helper HEAD error: %v", err)
		return false
	}
	defer res.Body.Close()
	return res.Header.Get("X-Camli-Contents") == wholeRef.String()
}
913412
func (k *DeployKey) GetContent() error {
	pkey, err := GetPublicKeyByID(k.KeyID)
	if err != nil {
		return err
	}
	k.Content = pkey.Content
	return nil
}