| 1 |
use std::fs::{File, OpenOptions}; |
| 2 |
use std::io; |
| 3 |
use std::path::Path; |
| 4 |
|
| 5 |
fn not_supported<T>() -> io::Result<T> { |
| 6 |
Err(io::Error::new( |
| 7 |
io::ErrorKind::Other, |
| 8 |
"operation not supported on this platform", |
| 9 |
)) |
| 10 |
} |
| 11 |
|
| 12 |
pub fn create_named( |
| 13 |
_path: &Path, |
| 14 |
_open_options: &mut OpenOptions, |
| 15 |
_permissions: Option<&std::fs::Permissions>, |
| 16 |
) -> io::Result<File> { |
| 17 |
not_supported() |
| 18 |
} |
| 19 |
|
| 20 |
pub fn create(_dir: &Path) -> io::Result<File> { |
| 21 |
not_supported() |
| 22 |
} |
| 23 |
|
| 24 |
pub fn reopen(_file: &File, _path: &Path) -> io::Result<File> { |
| 25 |
not_supported() |
| 26 |
} |
| 27 |
|
| 28 |
pub fn persist(_old_path: &Path, _new_path: &Path, _overwrite: bool) -> io::Result<()> { |
| 29 |
not_supported() |
| 30 |
} |
| 31 |
|
| 32 |
pub fn keep(_path: &Path) -> io::Result<()> { |
| 33 |
not_supported() |
| 34 |
} |