opt: rename_data

This commit is contained in:
weisd
2024-09-26 23:45:29 +08:00
parent 053cbc1b35
commit 03e3c8fb70
6 changed files with 1561 additions and 623 deletions
+4
View File
@@ -130,3 +130,7 @@ pub async fn mkdir(path: impl AsRef<Path>) -> io::Result<()> {
pub async fn rename(from: impl AsRef<Path>, to: impl AsRef<Path>) -> io::Result<()> {
fs::rename(from, to).await
}
pub async fn read_file(path: impl AsRef<Path>) -> io::Result<Vec<u8>> {
fs::read(path.as_ref()).await
}