MCPcopy Index your code
hub / github.com/dagger/dagger / AbsPath

Method AbsPath

engine/engineutil/filesync.go:61–71  ·  view source on GitHub ↗

Return the absolute path of the given path as calculated by the caller's host using OS-specific rules.

(ctx context.Context, path string)

Source from the content-addressed store, hash-verified

59
60// Return the absolute path of the given path as calculated by the caller's host using OS-specific rules.
61func (c *Client) AbsPath(ctx context.Context, path string) (string, error) {
62 msg := fsutiltypes.Stat{}
63 err := c.diffcopy(ctx, engine.LocalImportOpts{
64 Path: path,
65 GetAbsPathOnly: true,
66 }, &msg)
67 if err != nil {
68 return "", fmt.Errorf("failed to stat path: %w", err)
69 }
70 return msg.Path, nil
71}
72
73func (c *Client) StatCallerHostPath(ctx context.Context, path string, returnAbsPath bool) (*fsutiltypes.Stat, error) {
74 msg := fsutiltypes.Stat{}

Callers 5

localModuleSourceMethod · 0.80
directoryMethod · 0.80
findUpMethod · 0.80

Calls 1

diffcopyMethod · 0.95

Tested by

no test coverage detected