(path: &str)
| 73 | )), |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | fn writable_disk_path(path: &str) -> io::Result<PathBuf> { |
| 78 | validate_write_path(path)?; |
| 79 | match perro_io::resolve_path(path) { |
| 80 | perro_io::ResolvedPath::Disk(path) => Ok(path), |
| 81 | _ => Err(io::Error::new( |
| 82 | io::ErrorKind::Unsupported, |
| 83 | "path does not resolve to disk", |
| 84 | )), |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | fn writable_file_path(path: &str) -> io::Result<PathBuf> { |
| 89 | if path.starts_with("user://") { |
| 90 | return writable_disk_path(path); |
no test coverage detected