|
| 1 | +use std::{io, path::{Path, PathBuf}}; |
| 2 | + |
| 3 | +use crate::cha::Cha; |
| 4 | + |
| 5 | +pub struct Sftp; |
| 6 | + |
| 7 | +impl Sftp { |
| 8 | + pub fn cache<P>(_: P) -> Option<PathBuf> |
| 9 | + where |
| 10 | + P: AsRef<Path>, |
| 11 | + { |
| 12 | + todo!() |
| 13 | + } |
| 14 | + |
| 15 | + pub async fn canonicalize<P>(path: P) -> io::Result<PathBuf> |
| 16 | + where |
| 17 | + P: AsRef<Path>, |
| 18 | + { |
| 19 | + todo!() |
| 20 | + } |
| 21 | + |
| 22 | + pub async fn copy<P, Q>(from: P, to: Q, cha: Cha) -> io::Result<u64> |
| 23 | + where |
| 24 | + P: AsRef<Path>, |
| 25 | + Q: AsRef<Path>, |
| 26 | + { |
| 27 | + todo!() |
| 28 | + } |
| 29 | + |
| 30 | + pub async fn create<P>(path: P) -> io::Result<()> |
| 31 | + where |
| 32 | + P: AsRef<Path>, |
| 33 | + { |
| 34 | + todo!() |
| 35 | + } |
| 36 | + |
| 37 | + pub async fn create_dir<P>(path: P) -> io::Result<()> |
| 38 | + where |
| 39 | + P: AsRef<Path>, |
| 40 | + { |
| 41 | + todo!() |
| 42 | + } |
| 43 | + |
| 44 | + pub async fn create_dir_all<P>(path: P) -> io::Result<()> |
| 45 | + where |
| 46 | + P: AsRef<Path>, |
| 47 | + { |
| 48 | + todo!() |
| 49 | + } |
| 50 | + |
| 51 | + pub async fn hard_link<P, Q>(original: P, link: Q) -> io::Result<()> |
| 52 | + where |
| 53 | + P: AsRef<Path>, |
| 54 | + Q: AsRef<Path>, |
| 55 | + { |
| 56 | + todo!() |
| 57 | + } |
| 58 | + |
| 59 | + pub async fn metadata<P>(path: P) -> io::Result<std::fs::Metadata> |
| 60 | + where |
| 61 | + P: AsRef<Path>, |
| 62 | + { |
| 63 | + todo!() |
| 64 | + } |
| 65 | + |
| 66 | + pub async fn open<P>(path: P) -> io::Result<()> |
| 67 | + where |
| 68 | + P: AsRef<Path>, |
| 69 | + { |
| 70 | + todo!() |
| 71 | + } |
| 72 | + |
| 73 | + pub async fn read<P>(path: P) -> io::Result<Vec<u8>> |
| 74 | + where |
| 75 | + P: AsRef<Path>, |
| 76 | + { |
| 77 | + todo!() |
| 78 | + } |
| 79 | + |
| 80 | + pub async fn read_dir<P>(path: P) -> io::Result<()> |
| 81 | + where |
| 82 | + P: AsRef<Path>, |
| 83 | + { |
| 84 | + todo!() |
| 85 | + } |
| 86 | + |
| 87 | + pub fn read_dir_sync<P>(path: P) -> io::Result<()> |
| 88 | + where |
| 89 | + P: AsRef<Path>, |
| 90 | + { |
| 91 | + todo!() |
| 92 | + } |
| 93 | + |
| 94 | + pub async fn read_link<P>(path: P) -> io::Result<PathBuf> |
| 95 | + where |
| 96 | + P: AsRef<Path>, |
| 97 | + { |
| 98 | + todo!() |
| 99 | + } |
| 100 | + |
| 101 | + pub async fn read_to_string<P>(path: P) -> io::Result<String> |
| 102 | + where |
| 103 | + P: AsRef<Path>, |
| 104 | + { |
| 105 | + todo!() |
| 106 | + } |
| 107 | + |
| 108 | + pub async fn remove_dir<P>(path: P) -> io::Result<()> |
| 109 | + where |
| 110 | + P: AsRef<Path>, |
| 111 | + { |
| 112 | + todo!() |
| 113 | + } |
| 114 | + |
| 115 | + pub async fn remove_dir_all<P>(path: P) -> io::Result<()> |
| 116 | + where |
| 117 | + P: AsRef<Path>, |
| 118 | + { |
| 119 | + todo!() |
| 120 | + } |
| 121 | + |
| 122 | + pub async fn remove_file<P>(path: P) -> io::Result<()> |
| 123 | + where |
| 124 | + P: AsRef<Path>, |
| 125 | + { |
| 126 | + todo!() |
| 127 | + } |
| 128 | + |
| 129 | + pub async fn rename<P, Q>(from: P, to: Q) -> io::Result<()> |
| 130 | + where |
| 131 | + P: AsRef<Path>, |
| 132 | + Q: AsRef<Path>, |
| 133 | + { |
| 134 | + todo!() |
| 135 | + } |
| 136 | + |
| 137 | + pub async fn symlink<P, Q, F>(original: P, link: Q, _is_dir: F) -> io::Result<()> |
| 138 | + where |
| 139 | + P: AsRef<Path>, |
| 140 | + Q: AsRef<Path>, |
| 141 | + F: AsyncFnOnce() -> io::Result<bool>, |
| 142 | + { |
| 143 | + todo!() |
| 144 | + } |
| 145 | + |
| 146 | + pub async fn symlink_dir<P, Q>(original: P, link: Q) -> io::Result<()> |
| 147 | + where |
| 148 | + P: AsRef<Path>, |
| 149 | + Q: AsRef<Path>, |
| 150 | + { |
| 151 | + todo!() |
| 152 | + } |
| 153 | + |
| 154 | + pub async fn symlink_file<P, Q>(original: P, link: Q) -> io::Result<()> |
| 155 | + where |
| 156 | + P: AsRef<Path>, |
| 157 | + Q: AsRef<Path>, |
| 158 | + { |
| 159 | + todo!() |
| 160 | + } |
| 161 | + |
| 162 | + pub async fn symlink_metadata<P>(path: P) -> io::Result<std::fs::Metadata> |
| 163 | + where |
| 164 | + P: AsRef<Path>, |
| 165 | + { |
| 166 | + todo!() |
| 167 | + } |
| 168 | + |
| 169 | + pub fn symlink_metadata_sync<P>(path: P) -> io::Result<std::fs::Metadata> |
| 170 | + where |
| 171 | + P: AsRef<Path>, |
| 172 | + { |
| 173 | + todo!() |
| 174 | + } |
| 175 | + |
| 176 | + pub async fn trash<P>(path: P) -> io::Result<()> |
| 177 | + where |
| 178 | + P: AsRef<Path>, |
| 179 | + { |
| 180 | + todo!() |
| 181 | + } |
| 182 | + |
| 183 | + pub async fn write<P, C>(path: P, contents: C) -> io::Result<()> |
| 184 | + where |
| 185 | + P: AsRef<Path>, |
| 186 | + C: AsRef<[u8]>, |
| 187 | + { |
| 188 | + todo!() |
| 189 | + } |
| 190 | +} |
0 commit comments