Skip to content

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

Open
@folex

Description

@folex

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions