(ctx context.Context, path string)
| 45 | } |
| 46 | |
| 47 | func (c *Client) ReadCallerHostFile(ctx context.Context, path string) ([]byte, error) { |
| 48 | msg := filesync.BytesMessage{} |
| 49 | err := c.diffcopy(ctx, engine.LocalImportOpts{ |
| 50 | Path: path, |
| 51 | ReadSingleFileOnly: true, |
| 52 | MaxFileSize: MaxFileContentsChunkSize, |
| 53 | }, &msg) |
| 54 | if err != nil { |
| 55 | return nil, fmt.Errorf("failed to read file: %w", err) |
| 56 | } |
| 57 | return msg.Data, nil |
| 58 | } |
| 59 | |
| 60 | // Return the absolute path of the given path as calculated by the caller's host using OS-specific rules. |
| 61 | func (c *Client) AbsPath(ctx context.Context, path string) (string, error) { |
no test coverage detected