All mounts all the provided mounts to the provided target. If submounts are present, it assumes that parent mounts come before child mounts.
(mounts []Mount, target string)
| 49 | // All mounts all the provided mounts to the provided target. If submounts are |
| 50 | // present, it assumes that parent mounts come before child mounts. |
| 51 | func All(mounts []Mount, target string) error { |
| 52 | for _, m := range mounts { |
| 53 | if err := m.Mount(target); err != nil { |
| 54 | return err |
| 55 | } |
| 56 | } |
| 57 | return nil |
| 58 | } |
| 59 | |
| 60 | // UnmountMounts unmounts all the mounts under a target in the reverse order of |
| 61 | // the mounts array provided. |