src/client/pfs.go
func (c *putFileClient) PutFileURL(repoName string, commitID string, path string, url string, recursive bool, overwrite bool) (retErr error) {
	c.mu.Lock()
	defer c.mu.Unlock()
	var overwriteIndex *pfs.OverwriteIndex
	if overwrite {
		overwriteIndex = &pfs.OverwriteIndex{}
	}
	if c.oneoff {
		defer func() {
			if err := grpcutil.ScrubGRPC(c.Close()); err != nil && retErr == nil {
				retErr = err
			}
		}()
	}
	if err := c.c.Send(&pfs.PutFileRequest{
		File:           NewFile(repoName, commitID, path),
		Url:            url,
		Recursive:      recursive,
		OverwriteIndex: overwriteIndex,
	}); err != nil {
		return grpcutil.ScrubGRPC(err)
	}
	return nil
}
func (c *putFileClient) PutFileURL(repoName string, commitID string, path string, url string, recursive bool, overwrite bool) (retErr error) {
	c.mu.Lock()
	defer c.mu.Unlock()
	var overwriteIndex *pfs.OverwriteIndex
	if overwrite {
		overwriteIndex = &pfs.OverwriteIndex{}
	}
	if c.oneoff {
		defer func() {
			if err := grpcutil.ScrubGRPC(c.Close()); err != nil && retErr == nil {
				retErr = err
			}
		}()
	}
	if err := c.c.Send(&pfs.PutFileRequest{
		File:           NewFile(repoName, commitID, path),
		Url:            url,
		Recursive:      recursive,
		OverwriteIndex: overwriteIndex,
	}); err != nil {
		return grpcutil.ScrubGRPC(err)
	}
	return nil
}
func ( c * putFileClient ) PutFileURL ( repoName string , commitID string , path string , url string , recursive bool , overwrite bool ) ( retErr error ) { c . mu . Lock ( ) defer c . mu . Unlock ( ) var overwriteIndex * pfs . OverwriteIndex if overwrite { overwriteIndex = & pfs . OverwriteIndex { } } if c . oneoff { defer func ( ) { if err := grpcutil . ScrubGRPC ( c . Close ( ) ) ; err != nil && retErr == nil { retErr = err } } ( ) } if err := c . c . Send ( & pfs . PutFileRequest { File : NewFile ( repoName , commitID , path ) , Url : url , Recursive : recursive , OverwriteIndex : overwriteIndex , } ) ; err != nil { return grpcutil . ScrubGRPC ( err ) } return nil }
// PutFileURL puts a file using the content found at a URL.
// The URL is sent to the server which performs the request.
// recursive allow for recursive scraping of some types URLs for example on s3:// urls.
PutFileURL puts a file using the content found at a URL . The URL is sent to the server which performs the request . recursive allow for recursive scraping of some types URLs for example on s3 : // urls .