mobile build

This commit is contained in:
csf
2022-09-05 20:05:23 +08:00
parent 7eeb0f7335
commit bd733bc108
5 changed files with 30 additions and 15 deletions

View File

@@ -22,9 +22,9 @@ pub trait FileManager: Interface {
#[cfg(any(target_os = "android", target_os = "ios", feature = "cli"))]
fn read_dir(&self, path: &str, include_hidden: bool) -> String {
use crate::common::make_fd_to_json;
use crate::flutter::make_fd_to_json;
match fs::read_dir(&fs::get_path(path), include_hidden) {
Ok(fd) => make_fd_to_json(fd),
Ok(fd) => make_fd_to_json(fd.id, fd.path, &fd.entries),
Err(_) => "".into(),
}
}