Push a list of files from a local directory into a sandbox using tar-over-SSH. Files are streamed as a tar archive to `ssh ... tar xf - -C ` on the sandbox side. When `dest` is `None`, files are uploaded to the sandbox user's home directory.
(
server: &str,
name: &str,
base_dir: &Path,
files: &[String],
local_path: &Path,
dest: Option<&str>,
tls: &TlsOptions,
)
| 941 | /// the sandbox side. When `dest` is `None`, files are uploaded to the |
| 942 | /// sandbox user's home directory. |
| 943 | pub async fn sandbox_sync_up_files( |
| 944 | server: &str, |
| 945 | name: &str, |
| 946 | base_dir: &Path, |
| 947 | files: &[String], |
| 948 | local_path: &Path, |
| 949 | dest: Option<&str>, |
| 950 | tls: &TlsOptions, |
| 951 | ) -> Result<()> { |
| 952 | if files.is_empty() { |
| 953 | return Ok(()); |
| 954 | } |
| 955 | ssh_tar_upload( |
| 956 | server, |
| 957 | name, |
| 958 | dest, |
| 959 | UploadSource::FileList { |
| 960 | base_dir: base_dir.to_path_buf(), |
| 961 | files: files.to_vec(), |
| 962 | archive_prefix: file_list_archive_prefix(local_path), |
| 963 | }, |
| 964 | tls, |
| 965 | ) |
| 966 | .await |
| 967 | } |
| 968 | |
| 969 | /// Push a local path (file or directory) into a sandbox using tar-over-SSH. |
| 970 | /// |
no test coverage detected