Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

to_host_path: function to convert service path to host path via mappedDirs #41

Open
folex opened this issue Jul 1, 2021 · 0 comments
Open

Comments

@folex
Copy link
Member

folex commented Jul 1, 2021

Consider this use-case:

/tmp => /.fluence/v1/services/workdir/5c911af0-0e22-4a6c-bdd2-c6a376e2cf69/tmp
/tmp/vault => /.fluence/v1/stepper/particles/vault

I want to download file via curl or ipfs and specify output to /tmp/vault/XXX.

So I want to do

let cmd = ["-o", to_host_path("/tmp/vault/XXX")]
curl(cmd)

Please note that /tmp/ and /tmp/vault share the same prefix. So to_host_path should choose the longest prefix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant