Sha256: b9f2d93fc8c646103f0173fd63ce8ed11a7a7ebf78ef2443081effce1c4b4db7

Contents?: true

Size: 491 Bytes

Versions: 36

Compression:

Stored size: 491 Bytes

Contents

use crate::fs::copy_impl;
use std::path::Path;
use std::{fs, io};

/// Copies the contents of one file to another.
#[inline]
pub fn copy(
    from_start: &fs::File,
    from_path: &Path,
    to_start: &fs::File,
    to_path: &Path,
) -> io::Result<u64> {
    // In theory we could do extra sanity checks here, but `copy_impl`
    // implementations use other sandboxed routines to open the files,
    // so it'd be mostly redundant.
    copy_impl(from_start, from_path, to_start, to_path)
}

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
wasmtime-14.0.0 ./ext/cargo-vendor/cap-primitives-2.0.0/src/fs/copy.rs
wasmtime-13.0.0 ./ext/cargo-vendor/cap-primitives-2.0.0/src/fs/copy.rs
wasmtime-12.0.1 ./ext/cargo-vendor/cap-primitives-2.0.0/src/fs/copy.rs
wasmtime-12.0.0 ./ext/cargo-vendor/cap-primitives-2.0.0/src/fs/copy.rs
wasmtime-11.0.0 ./ext/cargo-vendor/cap-primitives-1.0.15/src/fs/copy.rs
wasmtime-10.0.1 ./ext/cargo-vendor/cap-primitives-1.0.15/src/fs/copy.rs
wasmtime-10.0.0 ./ext/cargo-vendor/cap-primitives-1.0.15/src/fs/copy.rs
wasmtime-9.0.4 ./ext/cargo-vendor/cap-primitives-1.0.15/src/fs/copy.rs
wasmtime-9.0.1 ./ext/cargo-vendor/cap-primitives-1.0.15/src/fs/copy.rs
wasmtime-8.0.0 ./ext/cargo-vendor/cap-primitives-1.0.14/src/fs/copy.rs
wasmtime-7.0.0 ./ext/cargo-vendor/cap-primitives-1.0.9/src/fs/copy.rs
wasmtime-6.0.1 ./ext/cargo-vendor/cap-primitives-1.0.5/src/fs/copy.rs
wasmtime-6.0.0 ./ext/cargo-vendor/cap-primitives-1.0.5/src/fs/copy.rs
wasmtime-5.0.0 ./ext/cargo-vendor/cap-primitives-1.0.4/src/fs/copy.rs
wasmtime-0.4.1 ./ext/cargo-vendor/cap-primitives-1.0.3/src/fs/copy.rs
wasmtime-0.4.0 ./ext/cargo-vendor/cap-primitives-1.0.2/src/fs/copy.rs