mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-02 08:53:32 +00:00
Merge pull request #1 from spacedropco/swift-mounts
Use swift-rs SRObjectArray to fetch mounts
This commit is contained in:
commit
640ed373f1
211
src-tauri/Cargo.lock
generated
211
src-tauri/Cargo.lock
generated
|
@ -10,9 +10,9 @@ checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3"
|
|||
|
||||
[[package]]
|
||||
name = "addr2line"
|
||||
version = "0.16.0"
|
||||
version = "0.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3e61f2b7f93d2c7d2b08263acaa4a363b3e276806c68af6134c44f523bf1aacd"
|
||||
checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b"
|
||||
dependencies = [
|
||||
"gimli",
|
||||
]
|
||||
|
@ -75,9 +75,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.44"
|
||||
version = "1.0.45"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "61604a8f862e1d5c3229fdd78f8b02c68dcf73a4c4b05fd636d12240aaa242c1"
|
||||
checksum = "ee10e43ae4a853c0a3591d4e2ada1719e553be18199d9da9d4a83f5927c2f5c7"
|
||||
|
||||
[[package]]
|
||||
name = "arrayref"
|
||||
|
@ -93,9 +93,9 @@ checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
|
|||
|
||||
[[package]]
|
||||
name = "arrayvec"
|
||||
version = "0.7.1"
|
||||
version = "0.7.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "be4dc07131ffa69b8072d35f5007352af944213cde02545e2103680baed38fcd"
|
||||
checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6"
|
||||
|
||||
[[package]]
|
||||
name = "async-channel"
|
||||
|
@ -345,9 +345,9 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
|
|||
|
||||
[[package]]
|
||||
name = "backtrace"
|
||||
version = "0.3.62"
|
||||
version = "0.3.63"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "091bcdf2da9950f96aa522681ce805e6857f6ca8df73833d35736ab2dc78e152"
|
||||
checksum = "321629d8ba6513061f26707241fa9bc89524ff1cd7a915a97ef0c62c666ce1b6"
|
||||
dependencies = [
|
||||
"addr2line",
|
||||
"cc",
|
||||
|
@ -411,12 +411,12 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "blake3"
|
||||
version = "1.1.0"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2607a74355ce2e252d0c483b2d8a348e1bba36036e786ccc2dcd777213c86ffd"
|
||||
checksum = "526c210b4520e416420759af363083471656e819a75e831b8d2c9d5a584f2413"
|
||||
dependencies = [
|
||||
"arrayref",
|
||||
"arrayvec 0.7.1",
|
||||
"arrayvec 0.7.2",
|
||||
"cc",
|
||||
"cfg-if 1.0.0",
|
||||
"constant_time_eq",
|
||||
|
@ -586,9 +586,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "cargo_metadata"
|
||||
version = "0.14.0"
|
||||
version = "0.14.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c297bd3135f558552f99a0daa180876984ea2c4ffa7470314540dff8c654109a"
|
||||
checksum = "ba2ae6de944143141f6155a473a6b02f66c7c3f9f47316f802f80204ebfe6e12"
|
||||
dependencies = [
|
||||
"camino",
|
||||
"cargo-platform",
|
||||
|
@ -689,7 +689,7 @@ dependencies = [
|
|||
"block",
|
||||
"cocoa-foundation",
|
||||
"core-foundation 0.9.2",
|
||||
"core-graphics 0.22.2",
|
||||
"core-graphics 0.22.3",
|
||||
"foreign-types",
|
||||
"libc",
|
||||
"objc",
|
||||
|
@ -743,9 +743,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "combine"
|
||||
version = "4.6.1"
|
||||
version = "4.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a909e4d93292cd8e9c42e189f61681eff9d67b6541f96b8a1a737f23737bd001"
|
||||
checksum = "b2b2f5d0ee456f3928812dfc8c6d9a1d592b98678f6d56db9b0cd2b7bc6c8db5"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"memchr",
|
||||
|
@ -760,12 +760,6 @@ dependencies = [
|
|||
"cache-padded",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "const-sha1"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fb58b6451e8c2a812ad979ed1d83378caa5e927eef2622017a45f251457c2c9d"
|
||||
|
||||
[[package]]
|
||||
name = "constant_time_eq"
|
||||
version = "0.1.5"
|
||||
|
@ -824,9 +818,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "core-graphics"
|
||||
version = "0.22.2"
|
||||
version = "0.22.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "269f35f69b542b80e736a20a89a05215c0ce80c2c03c514abb2e318b78379d86"
|
||||
checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"core-foundation 0.9.2",
|
||||
|
@ -889,9 +883,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "crc"
|
||||
version = "2.0.0"
|
||||
version = "2.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "10c2722795460108a7872e1cd933a85d6ec38abc4baecad51028f702da28889f"
|
||||
checksum = "49fc9a695bca7f35f5f4c15cddc84415f66a74ea78eef08e90c5024f2b540e23"
|
||||
dependencies = [
|
||||
"crc-catalog",
|
||||
]
|
||||
|
@ -1583,9 +1577,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "gimli"
|
||||
version = "0.25.0"
|
||||
version = "0.26.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7"
|
||||
checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4"
|
||||
|
||||
[[package]]
|
||||
name = "gio"
|
||||
|
@ -2098,9 +2092,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
|||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.105"
|
||||
version = "0.2.107"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "869d572136620d55835903746bcb5cdc54cb2851fd0aeec53220b4bb65ef3013"
|
||||
checksum = "fbe5e23404da5b4f555ef85ebed98fb4083e55a00c317800bc2a50ede9f3d219"
|
||||
|
||||
[[package]]
|
||||
name = "libgit2-sys"
|
||||
|
@ -2260,9 +2254,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "minimal-lexical"
|
||||
version = "0.1.4"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c64630dcdd71f1a64c435f54885086a0de5d6a12d104d69b165fb7d5286d677"
|
||||
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
|
||||
|
||||
[[package]]
|
||||
name = "minisign-verify"
|
||||
|
@ -2403,9 +2397,9 @@ checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb"
|
|||
|
||||
[[package]]
|
||||
name = "nom"
|
||||
version = "7.0.0"
|
||||
version = "7.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7ffd9d26838a953b4af82cbeb9f1592c6798916983959be223a7124e992742c1"
|
||||
checksum = "1b1d11e1ef389c76fe5b81bcaf2ea32cf88b62bc494e19f493d0b30e7a930109"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
"minimal-lexical",
|
||||
|
@ -2414,9 +2408,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "notify-rust"
|
||||
version = "4.5.4"
|
||||
version = "4.5.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "825e9c9efdcb4d14920f72e2ef329b4dae0219791834c000c42c1475dad341f8"
|
||||
checksum = "ca6ebab865e67efdd7182a88d76cadbdd2a8d02d1c7a4e16bb7c234016a12cac"
|
||||
dependencies = [
|
||||
"mac-notification-sys",
|
||||
"serde",
|
||||
|
@ -2561,9 +2555,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "openssl"
|
||||
version = "0.10.36"
|
||||
version = "0.10.38"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8d9facdb76fec0b73c406f125d44d86fdad818d66fef0531eec9233ca425ff4a"
|
||||
checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"cfg-if 1.0.0",
|
||||
|
@ -2581,9 +2575,9 @@ checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a"
|
|||
|
||||
[[package]]
|
||||
name = "openssl-sys"
|
||||
version = "0.9.67"
|
||||
version = "0.9.70"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "69df2d8dfc6ce3aaf44b40dec6f487d5a886516cf6879c49e98e0710f310a058"
|
||||
checksum = "c6517987b3f8226b5da3661dad65ff7f300cc59fb5ea8333ca191fc65fde3edf"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"cc",
|
||||
|
@ -2905,9 +2899,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "ppv-lite86"
|
||||
version = "0.2.14"
|
||||
version = "0.2.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c3ca011bd0129ff4ae15cd04c4eef202cadf6c51c21e47aba319b4e0501db741"
|
||||
checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba"
|
||||
|
||||
[[package]]
|
||||
name = "precomputed-hash"
|
||||
|
@ -2998,9 +2992,9 @@ checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086"
|
|||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.30"
|
||||
version = "1.0.32"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "edc3358ebc67bc8b7fa0c007f945b0b18226f78437d61bec735a9eb96b61ee70"
|
||||
checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43"
|
||||
dependencies = [
|
||||
"unicode-xid",
|
||||
]
|
||||
|
@ -3456,9 +3450,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "sea-orm"
|
||||
version = "0.3.1"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "22e50474d23364b40084498a41079f343a10a6c8700aa469eacdfb4ba00a2177"
|
||||
checksum = "008887f4c2d0228891facd84a2c0bfdf175671a7a727798c63c14dfe04e343b2"
|
||||
dependencies = [
|
||||
"async-stream",
|
||||
"async-trait",
|
||||
|
@ -3480,9 +3474,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "sea-orm-macros"
|
||||
version = "0.3.1"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ce39282dcace4fa8fca48e7cea9d767848c2a05a51b5df57241f4c52847b18e3"
|
||||
checksum = "f8d4da296bdf6ab25a89e09af3a0d80e94e18580575fae3f7fbe7314604e8c8c"
|
||||
dependencies = [
|
||||
"bae",
|
||||
"heck",
|
||||
|
@ -3493,9 +3487,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "sea-query"
|
||||
version = "0.18.0"
|
||||
version = "0.18.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "abb538b925899eb4b64767050dece7ed1aa2a0d9b1163958121eb6a308e0fe5f"
|
||||
checksum = "0ae0ce1a7c495076a9d6401c917b564fb75e77e05432e6c86084ca453b8256d7"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"rust_decimal",
|
||||
|
@ -3630,9 +3624,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.68"
|
||||
version = "1.0.69"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0f690853975602e1bfe1ccbf50504d67174e3bcf340f23b5ea9992e0587a52d8"
|
||||
checksum = "e466864e431129c7e0d3476b92f20458e5879919a0596c6472738d9fa2d342f8"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"itoa",
|
||||
|
@ -3688,9 +3682,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "sha256"
|
||||
version = "1.0.2"
|
||||
version = "1.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "77f336ed3354742b51d11c47dc0403bf81229548f2e130fcd21ccc471433334a"
|
||||
checksum = "4e84a7f596c081d359de5e06a83877138bc3c4483591e1af1916e1472e6e146e"
|
||||
dependencies = [
|
||||
"hex",
|
||||
"sha2",
|
||||
|
@ -3858,7 +3852,8 @@ dependencies = [
|
|||
"snafu",
|
||||
"sqlx",
|
||||
"strum 0.21.0",
|
||||
"swift-rs",
|
||||
"swift-rs 0.1.0",
|
||||
"swift-rs 0.2.2",
|
||||
"tauri",
|
||||
"tauri-build",
|
||||
"walkdir",
|
||||
|
@ -4079,6 +4074,15 @@ dependencies = [
|
|||
"strum_macros 0.21.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "strum"
|
||||
version = "0.22.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f7ac893c7d471c8a21f31cfe213ec4f6d9afeed25537c772e08ef3f005f8729e"
|
||||
dependencies = [
|
||||
"strum_macros 0.22.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "strum_macros"
|
||||
version = "0.18.0"
|
||||
|
@ -4103,6 +4107,18 @@ dependencies = [
|
|||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "strum_macros"
|
||||
version = "0.22.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "339f799d8b549e3744c7ac7feb216383e4005d94bdb22561b3ab8f3b808ae9fb"
|
||||
dependencies = [
|
||||
"heck",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "subprocess"
|
||||
version = "0.2.8"
|
||||
|
@ -4125,10 +4141,21 @@ dependencies = [
|
|||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.80"
|
||||
name = "swift-rs"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d010a1623fbd906d51d650a9916aaefc05ffa0e4053ff7fe601167f3e715d194"
|
||||
checksum = "429fcb93ca0ca9c60efba60a7f842254781c60d3e006f716c731e9901094c87e"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"serde",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.81"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f2afee18b8beb5a596ecb4a2dce128c719b4ba399d34126b9e4396e3f9860966"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -4190,7 +4217,7 @@ dependencies = [
|
|||
"cc",
|
||||
"cocoa",
|
||||
"core-foundation 0.9.2",
|
||||
"core-graphics 0.22.2",
|
||||
"core-graphics 0.22.3",
|
||||
"core-video-sys",
|
||||
"crossbeam-channel",
|
||||
"dispatch",
|
||||
|
@ -4492,9 +4519,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
|
|||
|
||||
[[package]]
|
||||
name = "tokio"
|
||||
version = "1.12.0"
|
||||
version = "1.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c2c2416fdedca8443ae44b4527de1ea633af61d8f7169ffa6e72c5b53d24efcc"
|
||||
checksum = "588b2d10a336da58d877567cd8fb8a14b463e2104910f8132cd054b4b96e29ee"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"bytes",
|
||||
|
@ -4708,9 +4735,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "value-bag"
|
||||
version = "1.0.0-alpha.7"
|
||||
version = "1.0.0-alpha.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dd320e1520f94261153e96f7534476ad869c14022aee1e59af7c778075d840ae"
|
||||
checksum = "79923f7731dc61ebfba3633098bf3ac533bbd35ccd8c57e7088d9a5eebe0263f"
|
||||
dependencies = [
|
||||
"ctor",
|
||||
"version_check",
|
||||
|
@ -4962,9 +4989,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "whoami"
|
||||
version = "1.1.5"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "483a59fee1a93fec90eb08bc2eb4315ef10f4ebc478b3a5fadc969819cb66117"
|
||||
checksum = "c33ac5ee236a4efbf2c98967e12c6cc0c51d93a744159a52957ba206ae6ef5f7"
|
||||
dependencies = [
|
||||
"wasm-bindgen",
|
||||
"web-sys",
|
||||
|
@ -5027,49 +5054,39 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
|||
|
||||
[[package]]
|
||||
name = "windows"
|
||||
version = "0.21.1"
|
||||
version = "0.24.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b8f5f8d2ea79bf690bbee453fd4a1516ae426e5d5c7215d96cc0c3dc134fc4a0"
|
||||
checksum = "a9f39345ae0c8ab072c0ac7fe8a8b411636aa34f89be19ddd0d9226544f13944"
|
||||
dependencies = [
|
||||
"const-sha1",
|
||||
"windows_gen",
|
||||
"windows_macros",
|
||||
"windows_reader",
|
||||
"windows_i686_gnu",
|
||||
"windows_i686_msvc",
|
||||
"windows_x86_64_gnu",
|
||||
"windows_x86_64_msvc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows_gen"
|
||||
version = "0.21.1"
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.24.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7e6994f42f8481387778cc608407d6703410672d57f32a66009419d7a18aa912"
|
||||
dependencies = [
|
||||
"windows_quote",
|
||||
"windows_reader",
|
||||
]
|
||||
checksum = "c0866510a3eca9aed73a077490bbbf03e5eaac4e1fd70849d89539e5830501fd"
|
||||
|
||||
[[package]]
|
||||
name = "windows_macros"
|
||||
version = "0.21.1"
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.24.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "81cc2357b1b03c19f056cb0e6d06011f80f54beadb4e36aee2ca98493c7cfc3c"
|
||||
dependencies = [
|
||||
"syn",
|
||||
"windows_gen",
|
||||
"windows_quote",
|
||||
"windows_reader",
|
||||
]
|
||||
checksum = "bf0ffed56b7e9369a29078d2ab3aaeceea48eb58999d2cff3aa2494a275b95c6"
|
||||
|
||||
[[package]]
|
||||
name = "windows_quote"
|
||||
version = "0.21.1"
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.24.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7cf987b5288c15e1997226848f78f3ed3ef8b78dcfd71a201c8c8684163a7e4d"
|
||||
checksum = "384a173630588044205a2993b6864a2f56e5a8c1e7668c07b93ec18cf4888dc4"
|
||||
|
||||
[[package]]
|
||||
name = "windows_reader"
|
||||
version = "0.21.1"
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.24.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "237b53e8b40766ea7db5da0d8c6c1442d21d0429f0ee7500d7b5688967bd9d7b"
|
||||
checksum = "9bd8f062d8ca5446358159d79a90be12c543b3a965c847c8f3eedf14b321d399"
|
||||
|
||||
[[package]]
|
||||
name = "winres"
|
||||
|
@ -5082,11 +5099,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "winrt-notification"
|
||||
version = "0.4.0"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f0cc832b8c66c42b3ee6b625c124fe2d0b3ff7fb2cec18b28926e9c4bfdb72da"
|
||||
checksum = "eda101fb8e034a25f3d50a0714d7ca4f234a4fc7bc57427f6d81040db0ccbe6a"
|
||||
dependencies = [
|
||||
"strum 0.21.0",
|
||||
"strum 0.22.0",
|
||||
"windows",
|
||||
"xml-rs",
|
||||
]
|
||||
|
@ -5098,7 +5115,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "0f9549393a3917b5303277abb0267f8eecf9fd629b25f1c04e5284aa58b61915"
|
||||
dependencies = [
|
||||
"cocoa",
|
||||
"core-graphics 0.22.2",
|
||||
"core-graphics 0.22.3",
|
||||
"gdk",
|
||||
"gio",
|
||||
"glib",
|
||||
|
|
|
@ -7,6 +7,7 @@ use crate::swift::get_file_thumbnail_base64;
|
|||
use anyhow::Result;
|
||||
use base64;
|
||||
use serde::Serialize;
|
||||
use swift_rs::types::{SRObjectArray};
|
||||
use std::fs;
|
||||
use std::time::Instant;
|
||||
use walkdir::WalkDir;
|
||||
|
@ -64,8 +65,8 @@ pub async fn get_config() -> Result<config::AppConfig, String> {
|
|||
Ok(config::get_config())
|
||||
}
|
||||
#[tauri::command]
|
||||
pub fn get_mounts() -> Result<Vec<swift::Mount>, String> {
|
||||
Ok(swift::get_mounts().unwrap())
|
||||
pub fn get_mounts() -> Result<SRObjectArray<swift::Mount>, String> {
|
||||
Ok(swift::get_mounts())
|
||||
}
|
||||
|
||||
#[tauri::command(async)]
|
||||
|
|
|
@ -1,33 +1,30 @@
|
|||
use anyhow::Result;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use swift_rs::types::SRString;
|
||||
use serde::Serialize;
|
||||
use swift_rs::types::{SRObjectArray, SRString};
|
||||
|
||||
#[derive(Serialize)]
|
||||
#[repr(C)]
|
||||
pub struct Mount {
|
||||
name: SRString,
|
||||
path: SRString,
|
||||
total_capacity: usize,
|
||||
available_capacity: usize,
|
||||
is_removable: bool,
|
||||
is_ejectable: bool,
|
||||
is_root_filesystem: bool,
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
#[link_name = "get_file_thumbnail_base64"]
|
||||
fn get_file_thumbnail_base64_(path: &SRString) -> &'static SRString;
|
||||
fn get_file_thumbnail_base64_(path: SRString) -> SRString;
|
||||
|
||||
#[link_name = "get_mounts"]
|
||||
fn get_mounts_() -> &'static SRString;
|
||||
fn get_mounts_() -> SRObjectArray<Mount>;
|
||||
}
|
||||
|
||||
pub fn get_file_thumbnail_base64(path: &str) -> &'static SRString {
|
||||
pub fn get_file_thumbnail_base64(path: &str) -> SRString {
|
||||
unsafe { get_file_thumbnail_base64_(path.into()) }
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct Mount {
|
||||
pub name: String,
|
||||
pub path: String,
|
||||
pub total_capacity: u64,
|
||||
pub available_capacity: u64,
|
||||
pub is_removable: bool,
|
||||
pub is_ejectable: bool,
|
||||
pub is_root_filesystem: bool,
|
||||
}
|
||||
pub fn get_mounts() -> Result<Vec<Mount>> {
|
||||
let func_res = unsafe { get_mounts_() };
|
||||
let mounts_json = func_res.to_string();
|
||||
let mounts: Vec<Mount> = serde_json::from_str(&mounts_json)?;
|
||||
|
||||
println!("mounts: {:?}", mounts);
|
||||
Ok(mounts)
|
||||
pub fn get_mounts() -> SRObjectArray<Mount> {
|
||||
unsafe { get_mounts_() }
|
||||
}
|
||||
|
|
|
@ -12,9 +12,19 @@ public func getFileThumbnailBase64(path: SRString) -> SRString {
|
|||
return SRString(bitmap.base64EncodedString())
|
||||
}
|
||||
|
||||
public struct Volume : Codable {
|
||||
var name: String
|
||||
var path: String
|
||||
class Volume: NSObject {
|
||||
internal init(name: String, path: String, total_capacity: Int, available_capacity: Int, is_removable: Bool, is_ejectable: Bool, is_root_filesystem: Bool) {
|
||||
self.name = SRString(name)
|
||||
self.path = SRString(path)
|
||||
self.total_capacity = total_capacity
|
||||
self.available_capacity = available_capacity
|
||||
self.is_removable = is_removable
|
||||
self.is_ejectable = is_ejectable
|
||||
self.is_root_filesystem = is_root_filesystem
|
||||
}
|
||||
|
||||
var name: SRString
|
||||
var path: SRString
|
||||
var total_capacity: Int
|
||||
var available_capacity: Int
|
||||
var is_removable: Bool
|
||||
|
@ -22,9 +32,8 @@ public struct Volume : Codable {
|
|||
var is_root_filesystem: Bool
|
||||
}
|
||||
|
||||
|
||||
@_cdecl("get_mounts")
|
||||
public func getMounts() -> SRString {
|
||||
public func getMounts() -> SRObjectArray {
|
||||
let keys: [URLResourceKey] = [
|
||||
.volumeNameKey,
|
||||
.volumeIsRemovableKey,
|
||||
|
@ -35,9 +44,9 @@ public func getMounts() -> SRString {
|
|||
]
|
||||
let paths = FileManager().mountedVolumeURLs(includingResourceValuesForKeys: keys, options: [])
|
||||
|
||||
var validMounts: [Volume] = []
|
||||
|
||||
if let urls = paths {
|
||||
var validMounts: [Volume] = []
|
||||
|
||||
for url in urls {
|
||||
let components = url.pathComponents
|
||||
if components.count == 1 || components.count > 1
|
||||
|
@ -58,16 +67,9 @@ public func getMounts() -> SRString {
|
|||
validMounts.append(volume)
|
||||
}
|
||||
}
|
||||
let jsonData = try? JSONEncoder().encode(validMounts)
|
||||
|
||||
if jsonData != nil {
|
||||
let jsonString = String(data: jsonData!, encoding: .utf8)!
|
||||
return SRString(jsonString)
|
||||
}
|
||||
return SRString("")
|
||||
|
||||
}
|
||||
return SRString("")
|
||||
|
||||
return SRObjectArray(validMounts)
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue