summaryrefslogtreecommitdiffstats
path: root/third_party/rust/tempfile/src/file/imp/other.rs
blob: 8721d2da64ec041f2913ca22b93913e3c9d8363b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use std::fs::{File, OpenOptions};
use std::io;
use std::path::Path;

fn not_supported<T>() -> io::Result<T> {
    Err(io::Error::new(
        io::ErrorKind::Other,
        "operation not supported on this platform",
    ))
}

pub fn create_named(_path: &Path, _open_options: &mut OpenOptions) -> io::Result<File> {
    not_supported()
}

pub fn create(_dir: &Path) -> io::Result<File> {
    not_supported()
}

pub fn reopen(_file: &File, _path: &Path) -> io::Result<File> {
    not_supported()
}

pub fn persist(_old_path: &Path, _new_path: &Path, _overwrite: bool) -> io::Result<()> {
    not_supported()
}

pub fn keep(_path: &Path) -> io::Result<()> {
    not_supported()
}