pub(crate) fn copy_app(app_dir: impl AsRef<Path>) -> Result<TempDir, PrepareAppError> {
    tempdir()
        .map_err(PrepareAppError::CreateTempDirError)
        .and_then(|temp_app_dir| {
            fs_extra::dir::copy(
                app_dir.as_ref(),
                temp_app_dir.path(),
                &CopyOptions {
                    content_only: true,
                    ..CopyOptions::default()
                },
            )
            .map_err(PrepareAppError::CopyAppError)
            .map(|_| temp_app_dir)
        })
}
/// Copies an application directory to a temporary location.
Copies an application directory to a temporary location.
Copies an application directory to a temporary location .
pub(crate) fn copy_app(app_dir: impl AsRef<Path>) -> Result<TempDir, PrepareAppError> {
    tempdir()
        .map_err(PrepareAppError::CreateTempDirError)
        .and_then(|temp_app_dir| {
            fs_extra::dir::copy(
                app_dir.as_ref(),
                temp_app_dir.path(),
                &CopyOptions {
                    content_only: true,
                    ..CopyOptions::default()
                },
            )
            .map_err(PrepareAppError::CopyAppError)
            .map(|_| temp_app_dir)
        })
}
pub ( crate ) fn copy_app ( app_dir : impl AsRef < Path > ) -> Result < TempDir , PrepareAppError > { tempdir ( ) . map_err ( PrepareAppError :: CreateTempDirError ) . and_then ( | temp_app_dir | { fs_extra :: dir :: copy ( app_dir . as_ref ( ) , temp_app_dir . path ( ) , & CopyOptions { content_only : true , .. CopyOptions :: default ( ) } , ) . map_err ( PrepareAppError :: CopyAppError ) . map ( | _ | temp_app_dir ) } ) }
Copies an application directory to a temporary location.
Copies an application directory to a temporary location .
app_dir
impl AsRef<Path>
app_dir
impl AsRef<Path>