Sha256: 40b957b3ff11873a35e3093c28a69d22e7af863ad8b8b8bdf772b73745a9d75b

Contents?: true

Size: 505 Bytes

Versions: 39

Compression:

Stored size: 505 Bytes

Contents

use super::get_path::get_path;
use crate::fs::{open, OpenOptions};
use std::path::Path;
use std::{fs, io};

pub(crate) fn copy_impl(
    from_start: &fs::File,
    from_path: &Path,
    to_start: &fs::File,
    to_path: &Path,
) -> io::Result<u64> {
    let from = open(from_start, from_path, OpenOptions::new().read(true))?;
    let to = open(
        to_start,
        to_path,
        OpenOptions::new().create(true).truncate(true).write(true),
    )?;
    fs::copy(get_path(&from)?, get_path(&to)?)
}

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
wasmtime-30.0.2 ./ext/cargo-vendor/cap-primitives-3.4.2/src/windows/fs/copy.rs
wasmtime-29.0.0 ./ext/cargo-vendor/cap-primitives-3.4.2/src/windows/fs/copy.rs
wasmtime-28.0.0 ./ext/cargo-vendor/cap-primitives-3.4.2/src/windows/fs/copy.rs
wasmtime-27.0.0 ./ext/cargo-vendor/cap-primitives-3.4.1/src/windows/fs/copy.rs
wasmtime-26.0.0 ./ext/cargo-vendor/cap-primitives-3.3.0/src/windows/fs/copy.rs
wasmtime-25.0.2 ./ext/cargo-vendor/cap-primitives-3.2.0/src/windows/fs/copy.rs
wasmtime-25.0.1 ./ext/cargo-vendor/cap-primitives-3.2.0/src/windows/fs/copy.rs
wasmtime-25.0.0 ./ext/cargo-vendor/cap-primitives-3.2.0/src/windows/fs/copy.rs
wasmtime-24.0.0 ./ext/cargo-vendor/cap-primitives-3.2.0/src/windows/fs/copy.rs
wasmtime-23.0.2 ./ext/cargo-vendor/cap-primitives-3.1.0/src/windows/fs/copy.rs
wasmtime-22.0.0 ./ext/cargo-vendor/cap-primitives-3.1.0/src/windows/fs/copy.rs
wasmtime-21.0.1 ./ext/cargo-vendor/cap-primitives-3.1.0/src/windows/fs/copy.rs
wasmtime-20.0.2 ./ext/cargo-vendor/cap-primitives-3.1.0/src/windows/fs/copy.rs
wasmtime-20.0.0 ./ext/cargo-vendor/cap-primitives-3.0.0/src/windows/fs/copy.rs
wasmtime-18.0.3 ./ext/cargo-vendor/cap-primitives-2.0.1/src/windows/fs/copy.rs
wasmtime-17.0.1 ./ext/cargo-vendor/cap-primitives-2.0.1/src/windows/fs/copy.rs
wasmtime-17.0.0 ./ext/cargo-vendor/cap-primitives-2.0.1/src/windows/fs/copy.rs
wasmtime-16.0.0 ./ext/cargo-vendor/cap-primitives-2.0.1/src/windows/fs/copy.rs
wasmtime-15.0.1 ./ext/cargo-vendor/cap-primitives-2.0.1/src/windows/fs/copy.rs
wasmtime-15.0.0 ./ext/cargo-vendor/cap-primitives-2.0.1/src/windows/fs/copy.rs