Debian Codegraph @

src/unsupported.rs

raw symbols SCIP
1 use std::env;
2 use std::io;
3 use std::path::Path;
4
5 /// This function is not implemented for this platform
6 pub fn clone_file<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dest: Q) -> io::Result<()> {
7 operation_not_supported()
8 }
9
10 /// This function is not implemented for this platform
11 pub fn clone_file_range<P: AsRef<Path>, Q: AsRef<Path>>(
12 src: P,
13 src_offset: u64,
14 src_length: u64,
15 dest: Q,
16 dest_offset: u64,
17 ) -> io::Result<()> {
18 operation_not_supported()
19 }
20
21 fn operation_not_supported() -> io::Result<()> {
22 Err(io::Error::new(
23 io::ErrorKind::Other,
24 format!(
25 "Operation not supported on {}-{}-{}",
26 env::consts::ARCH,
27 env::consts::OS,
28 env::consts::FAMILY
29 ),
30 ))
31 }