mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-04 12:13:27 +00:00
parent
05782165e7
commit
54acb0dd86
|
@ -5,7 +5,6 @@
|
|||
use crate::{invalidate_query, library::Library, location::manager::LocationManagerError, Node};
|
||||
|
||||
use sd_prisma::prisma::location;
|
||||
use sd_utils::error::FileIOError;
|
||||
|
||||
use std::{
|
||||
collections::{BTreeMap, HashMap},
|
||||
|
@ -14,15 +13,12 @@ use std::{
|
|||
};
|
||||
|
||||
use async_trait::async_trait;
|
||||
use notify::{
|
||||
event::{CreateKind, DataChange, ModifyKind, RenameMode},
|
||||
Event,
|
||||
};
|
||||
use tokio::{fs, time::Instant};
|
||||
use notify::Event;
|
||||
use tokio::time::Instant;
|
||||
use tracing::{error, info, trace};
|
||||
|
||||
use super::{
|
||||
utils::{create_dir, recalculate_directories_size, remove, rename, update_file},
|
||||
utils::{recalculate_directories_size, remove, update_file},
|
||||
EventHandler, HUNDRED_MILLIS, ONE_SECOND,
|
||||
};
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ use std::str;
|
|||
use serde::{Deserialize, Serialize};
|
||||
use specta::Type;
|
||||
use strum_macros::{Display, EnumIter};
|
||||
use sysinfo::{System, SystemExt};
|
||||
use sysinfo::SystemExt;
|
||||
|
||||
#[repr(i32)]
|
||||
#[derive(Debug, Clone, Display, Copy, EnumIter, Type, Serialize, Deserialize, Eq, PartialEq)]
|
||||
|
|
|
@ -2,28 +2,19 @@
|
|||
use sd_cache::Model;
|
||||
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
fmt::Display,
|
||||
hash::{Hash, Hasher},
|
||||
os::unix::fs::MetadataExt,
|
||||
path::PathBuf,
|
||||
sync::OnceLock,
|
||||
};
|
||||
|
||||
#[cfg(target_os = "ios")]
|
||||
use icrate::{
|
||||
objc2::runtime::{Class, Object},
|
||||
objc2::{msg_send, sel},
|
||||
Foundation::{self, ns_string, NSFileManager, NSFileSystemSize, NSNumber, NSString},
|
||||
};
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_with::{serde_as, DisplayFromStr};
|
||||
use specta::Type;
|
||||
use sysinfo::{DiskExt, System, SystemExt};
|
||||
use thiserror::Error;
|
||||
use tokio::sync::Mutex;
|
||||
use tracing::{error, info};
|
||||
use tracing::error;
|
||||
|
||||
pub mod watcher;
|
||||
|
||||
|
@ -234,6 +225,14 @@ pub async fn get_volumes() -> Vec<Volume> {
|
|||
|
||||
#[cfg(target_os = "ios")]
|
||||
pub async fn get_volumes() -> Vec<Volume> {
|
||||
use std::os::unix::fs::MetadataExt;
|
||||
|
||||
use icrate::{
|
||||
objc2::runtime::{Class, Object},
|
||||
objc2::{msg_send, sel},
|
||||
Foundation::{self, ns_string, NSFileManager, NSFileSystemSize, NSNumber, NSString},
|
||||
};
|
||||
|
||||
let mut volumes: Vec<Volume> = Vec::new();
|
||||
|
||||
unsafe {
|
||||
|
|
Loading…
Reference in a new issue