1#[derive(Clone, Copy, Debug, PartialEq, Eq)]
2pub enum FileKind {
3 File,
4 Directory,
5 Symlink,
6 Other,
7}
8
9#[derive(Clone, Debug, PartialEq, Eq)]
10pub struct FileEntry {
11 pub name: String,
12 pub relative_path: String,
13 pub parent_relative_path: String,
14 pub kind: FileKind,
15 pub is_directory: bool,
16 pub in_batch: bool,
17 pub size_bytes: u64,
18 pub modified_unix_seconds: Option<u64>,
19 pub size_label: String,
20 pub modified_label: String,
21 pub permissions_label: String,
22}
23
24#[derive(Clone, Debug, PartialEq, Eq)]
25pub struct Breadcrumb {
26 pub name: String,
27 pub path: String,
28}
29
30#[derive(Clone, Debug, PartialEq, Eq, Default)]
31pub struct DirectoryListing {
32 pub current_path: String,
33 pub current_path_display: String,
34 pub breadcrumbs: Vec<Breadcrumb>,
35 pub entries: Vec<FileEntry>,
36 pub total_entries: usize,
37}
38
39#[derive(Clone, Debug, PartialEq, Eq, Default)]
40pub struct SearchResults {
41 pub query: String,
42 pub entries: Vec<FileEntry>,
43 pub total_matches: usize,
44 pub is_truncated: bool,
45}
46
47#[derive(Clone, Debug, PartialEq, Eq)]
48pub struct BatchEntry {
49 pub relative_path: String,
50 pub display_path: String,
51}
52
53#[derive(Clone, Debug, PartialEq, Eq)]
54pub struct DownloadLauncherEntry {
55 pub relative_path: String,
56 pub download_url: String,
57}
58
59#[derive(Clone, Debug, PartialEq, Eq)]
60pub struct StorageUsage {
61 pub used_bytes: u64,
62 pub available_bytes: u64,
63 pub total_bytes: u64,
64 pub used_percent: u8,
65 pub used_label: String,
66 pub available_label: String,
67 pub total_label: String,
68}
69
70#[derive(Clone, Debug, PartialEq, Eq)]
71pub struct MountOption {
72 pub id: String,
73 pub name: String,
74 pub is_active: bool,
75 pub is_available: bool,
76 pub error_message: Option<String>,
77 pub switch_url: String,
78}
79
80#[derive(Clone, Debug, PartialEq, Eq)]
81pub struct MoveTargetOption {
82 pub id: String,
83 pub name: String,
84}