Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

Say why a shared iCloud download isn't listed

Țugui Dragoșb7d908228e2c
diff --git a/GUIDE.md b/GUIDE.md
index 5882f9f5..7188e44a 100644
--- a/GUIDE.md
+++ b/GUIDE.md
@@ -70,7 +70,9 @@ Space shows what fills your disk, area by area, and what each area is.
takes only what you can download again: an installed app's installer, or one in Downloads, never an encrypted disk
image. A disk image can also be one you made to keep files in, so look before you select it.
- **iCloud Drive:** files already safe in iCloud that are also downloaded to this Mac. Remove Downloads, as in
- Finder, takes away only the copy on this Mac: each file stays in iCloud and downloads again when you open it.
+ Finder, takes away only the copy on this Mac: each file stays in iCloud and downloads again when you open it. A
+ download whose space on disk is shared with another copy on this Mac would free nothing, so it isn't listed, and
+ the page says how many there are.
- **Space:** what's taking up room, and which app it belongs to. What an app manages itself, such as Docker's disk,
Space leaves to that app, with the command that frees it, when there is one, for you to copy.
- **File Search:** large or old files, found through Spotlight.
diff --git a/Localization/Peel/Localizable.xcstrings b/Localization/Peel/Localizable.xcstrings
index fe785fdc..a58f53ae 100644
--- a/Localization/Peel/Localizable.xcstrings
+++ b/Localization/Peel/Localizable.xcstrings
@@ -103783,6 +103783,346 @@
}
}
},
+ "Peel doesn’t list ^[%lld download](inflect: true) whose space on disk is shared with another copy on this Mac: removing a download like that frees nothing now." : {
+ "localizations" : {
+ "cs" : {
+ "variations" : {
+ "plural" : {
+ "few" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel nezobrazuje %lld stažené kopie, které sdílejí místo na disku s jinou kopií v tomto Macu: odstranění takové stažené kopie teď nic neuvolní."
+ }
+ },
+ "many" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel nezobrazuje %lld stažené kopie, které sdílejí místo na disku s jinou kopií v tomto Macu: odstranění takové stažené kopie teď nic neuvolní."
+ }
+ },
+ "one" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel nezobrazuje %lld staženou kopii, která sdílí místo na disku s jinou kopií v tomto Macu: odstranění takové stažené kopie teď nic neuvolní."
+ }
+ },
+ "other" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel nezobrazuje %lld stažených kopií, které sdílejí místo na disku s jinou kopií v tomto Macu: odstranění takové stažené kopie teď nic neuvolní."
+ }
+ }
+ }
+ }
+ },
+ "de" : {
+ "variations" : {
+ "plural" : {
+ "one" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel zeigt %lld Download nicht an, der sich Speicherplatz mit einer anderen Kopie auf diesem Mac teilt: Das Entfernen eines solchen Downloads gibt derzeit nichts frei."
+ }
+ },
+ "other" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel zeigt %lld Downloads nicht an, die sich Speicherplatz mit einer anderen Kopie auf diesem Mac teilen: Das Entfernen eines solchen Downloads gibt derzeit nichts frei."
+ }
+ }
+ }
+ }
+ },
+ "es" : {
+ "variations" : {
+ "plural" : {
+ "many" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel no muestra %lld de descargas que comparten almacenamiento con otra copia en este Mac: eliminar una descarga así no libera nada por ahora."
+ }
+ },
+ "one" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel no muestra %lld descarga que comparte almacenamiento con otra copia en este Mac: eliminar una descarga así no libera nada por ahora."
+ }
+ },
+ "other" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel no muestra %lld descargas que comparten almacenamiento con otra copia en este Mac: eliminar una descarga así no libera nada por ahora."
+ }
+ }
+ }
+ }
+ },
+ "fr" : {
+ "variations" : {
+ "plural" : {
+ "many" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel ne liste pas %lld de téléchargements dont le stockage est partagé avec une autre copie sur ce Mac : retirer un tel téléchargement ne libère rien pour l’instant."
+ }
+ },
+ "one" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel ne liste pas %lld téléchargement dont le stockage est partagé avec une autre copie sur ce Mac : retirer un tel téléchargement ne libère rien pour l’instant."
+ }
+ },
+ "other" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel ne liste pas %lld téléchargements dont le stockage est partagé avec une autre copie sur ce Mac : retirer un tel téléchargement ne libère rien pour l’instant."
+ }
+ }
+ }
+ }
+ },
+ "it" : {
+ "variations" : {
+ "plural" : {
+ "many" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel non elenca %lld di download che condividono lo spazio su disco con un’altra copia su questo Mac: rimuovere un download del genere ora non libera nulla."
+ }
+ },
+ "one" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel non elenca %lld download che condivide lo spazio su disco con un’altra copia su questo Mac: rimuovere un download del genere ora non libera nulla."
+ }
+ },
+ "other" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel non elenca %lld download che condividono lo spazio su disco con un’altra copia su questo Mac: rimuovere un download del genere ora non libera nulla."
+ }
+ }
+ }
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peelは、ダウンロードしたもののうち、このMac上の別のコピーとストレージを共有している%lld個を一覧に表示しません。このようなダウンロードしたものは、削除しても現在は何も解放されないためです。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel은 이 Mac에 있는 다른 복사본과 저장 공간을 공유하는 다운로드 %lld개를 목록에 표시하지 않습니다. 이런 다운로드는 제거해도 지금은 확보되는 공간이 없습니다."
+ }
+ },
+ "nl" : {
+ "variations" : {
+ "plural" : {
+ "one" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel laat %lld download weg die opslag deelt met een andere kopie op deze Mac: als je zo'n download verwijdert, komt er nu niets vrij."
+ }
+ },
+ "other" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel laat %lld downloads weg die opslag delen met een andere kopie op deze Mac: als je zo'n download verwijdert, komt er nu niets vrij."
+ }
+ }
+ }
+ }
+ },
+ "pl" : {
+ "variations" : {
+ "plural" : {
+ "few" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel nie wyświetla %lld pobranych rzeczy, które współdzielą miejsce na dysku z inną kopią na tym Macu: usunięcie takiej pobranej rzeczy nie zwolni teraz żadnego miejsca."
+ }
+ },
+ "many" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel nie wyświetla %lld pobranych rzeczy, które współdzielą miejsce na dysku z inną kopią na tym Macu: usunięcie takiej pobranej rzeczy nie zwolni teraz żadnego miejsca."
+ }
+ },
+ "one" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel nie wyświetla %lld pobranej rzeczy, która współdzieli miejsce na dysku z inną kopią na tym Macu: usunięcie takiej pobranej rzeczy nie zwolni teraz żadnego miejsca."
+ }
+ },
+ "other" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel nie wyświetla %lld pobranej rzeczy, która współdzieli miejsce na dysku z inną kopią na tym Macu: usunięcie takiej pobranej rzeczy nie zwolni teraz żadnego miejsca."
+ }
+ }
+ }
+ }
+ },
+ "pt" : {
+ "variations" : {
+ "plural" : {
+ "many" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "O Peel não lista %lld de downloads que compartilham armazenamento com outra cópia neste Mac: remover um download assim não libera nada agora."
+ }
+ },
+ "one" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "O Peel não lista %lld download que compartilha armazenamento com outra cópia neste Mac: remover um download assim não libera nada agora."
+ }
+ },
+ "other" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "O Peel não lista %lld downloads que compartilham armazenamento com outra cópia neste Mac: remover um download assim não libera nada agora."
+ }
+ }
+ }
+ }
+ },
+ "ro" : {
+ "variations" : {
+ "plural" : {
+ "few" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel nu listează %lld descărcări care partajează spațiul de stocare cu o altă copie de pe acest Mac: eliminarea unei astfel de descărcări nu eliberează nimic acum."
+ }
+ },
+ "one" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel nu listează %lld descărcare care partajează spațiul de stocare cu o altă copie de pe acest Mac: eliminarea unei astfel de descărcări nu eliberează nimic acum."
+ }
+ },
+ "other" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel nu listează %lld de descărcări care partajează spațiul de stocare cu o altă copie de pe acest Mac: eliminarea unei astfel de descărcări nu eliberează nimic acum."
+ }
+ }
+ }
+ }
+ },
+ "ru" : {
+ "variations" : {
+ "plural" : {
+ "few" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel не показывает %lld загрузки, которые используют общее пространство на диске с другими копиями на этом Mac: удаление такой загрузки сейчас ничего не освободит."
+ }
+ },
+ "many" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel не показывает %lld загрузок, которые используют общее пространство на диске с другими копиями на этом Mac: удаление такой загрузки сейчас ничего не освободит."
+ }
+ },
+ "one" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel не показывает %lld загрузку, которая использует общее пространство на диске с другой копией на этом Mac: удаление такой загрузки сейчас ничего не освободит."
+ }
+ },
+ "other" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel не показывает %lld загрузки, которые используют общее пространство на диске с другими копиями на этом Mac: удаление такой загрузки сейчас ничего не освободит."
+ }
+ }
+ }
+ }
+ },
+ "sv" : {
+ "variations" : {
+ "plural" : {
+ "one" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel visar inte %lld hämtning vars lagringsutrymme delas med en annan kopia på den här datorn: att ta bort en sådan hämtning frigör inget just nu."
+ }
+ },
+ "other" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel visar inte %lld hämtningar vars lagringsutrymme delas med en annan kopia på den här datorn: att ta bort en sådan hämtning frigör inget just nu."
+ }
+ }
+ }
+ }
+ },
+ "tr" : {
+ "variations" : {
+ "plural" : {
+ "one" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel, bu Mac’teki başka bir kopyayla aynı saklama alanını paylaşan %lld indirilen dosyayı listelemiyor: böyle bir dosyanın indirilen kopyasını kaldırmak şu anda hiç yer boşaltmaz."
+ }
+ },
+ "other" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel, bu Mac’teki başka bir kopyayla aynı saklama alanını paylaşan %lld indirilen dosyayı listelemiyor: böyle bir dosyanın indirilen kopyasını kaldırmak şu anda hiç yer boşaltmaz."
+ }
+ }
+ }
+ }
+ },
+ "uk" : {
+ "variations" : {
+ "plural" : {
+ "few" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel не показує %lld викачування, які спільно використовують сховище з іншою копією на цьому Mac: вилучення такого викачування зараз нічого не звільнить."
+ }
+ },
+ "many" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel не показує %lld викачувань, які спільно використовують сховище з іншою копією на цьому Mac: вилучення такого викачування зараз нічого не звільнить."
+ }
+ },
+ "one" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel не показує %lld викачування, яке спільно використовує сховище з іншою копією на цьому Mac: вилучення такого викачування зараз нічого не звільнить."
+ }
+ },
+ "other" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel не показує %lld викачування, які спільно використовують сховище з іншою копією на цьому Mac: вилучення такого викачування зараз нічого не звільнить."
+ }
+ }
+ }
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel未列出%lld个已下载的文件,它们与这台Mac上的另一个副本共享储存空间:移除这类文件的下载目前不会释放任何空间。"
+ }
+ },
+ "zh-Hant" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Peel不會列出%lld個與這部Mac上另一個副本共用儲存空間的下載項目:移除這類下載項目現在不會釋放任何空間。"
+ }
+ }
+ }
+ },
"Peel doesn’t remove them: a deleted snapshot can’t be put back, unlike what Peel moves to the Trash. `%@` deletes Time Machine’s snapshots, if you are sure." : {
"localizations" : {
"cs" : {
diff --git a/Packages/PeelCore/Sources/PeelCore/Space/CloudStorage.swift b/Packages/PeelCore/Sources/PeelCore/Space/CloudStorage.swift
index b804a793..9776ba7f 100644
--- a/Packages/PeelCore/Sources/PeelCore/Space/CloudStorage.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Space/CloudStorage.swift
@@ -28,6 +28,9 @@ public struct CloudScan: Sendable {
public var wasCutShort = false
/// iCloud Drive could not be read at all, which is what happens without Full Disk Access.
public var couldNotRead = false
+ /// How many downloads were left out because another copy on this Mac shares their space: each takes at least
+ /// `CloudStorage.minimumSize` on disk, yet removing it would free less.
+ public var sharedDownloads = 0
}
/// A file that was not freed, and why.
@@ -119,7 +122,8 @@ public enum CloudStorage {
return CloudScan(
files: collected.files.sorted { $0.size > $1.size },
wasCutShort: finished == nil || collected.wasCutShort,
- couldNotRead: collected.couldNotRead
+ couldNotRead: collected.couldNotRead,
+ sharedDownloads: collected.sharedDownloads
)
}
@@ -130,6 +134,7 @@ public enum CloudStorage {
var files: [CloudFile] = []
var wasCutShort = false
var couldNotRead = false
+ var sharedDownloads = 0
}
private let state = Mutex(Collected())
@@ -188,6 +193,10 @@ public enum CloudStorage {
func unreadable() {
state.withLock { $0.couldNotRead = true }
}
+
+ func leftOutAsShared() {
+ state.withLock { $0.sharedDownloads += 1 }
+ }
}
/// Walks iCloud Drive and adds each file worth freeing to `collector`. Stops at `deadline` as well as when
@@ -241,7 +250,10 @@ public enum CloudStorage {
isSafe(values)
else { continue }
let measured = values.isRegularFile == true
- ? (size: ReclaimableSpace.of(url), modified: values.contentModificationDate)
+ ? (
+ size: ReclaimableSpace.of(url), taken: ReclaimableSpace.allocated(url),
+ modified: values.contentModificationDate
+ )
: package(url, values, exclusions: exclusions, countingFor: scan, unless: stopped)
guard let measured else {
if stopped() {
@@ -250,7 +262,10 @@ public enum CloudStorage {
}
continue
}
- guard measured.size >= minimumSize else { continue }
+ guard measured.size >= minimumSize else {
+ if measured.taken >= minimumSize { collector.leftOutAsShared() }
+ continue
+ }
let file = CloudFile(
url: url,
@@ -310,20 +325,22 @@ public enum CloudStorage {
(error as? CocoaError)?.code == .fileLocking ? .inUse : .failed(error.localizedDescription)
}
- /// A document saved as a package, which iCloud keeps as one item: what removing its download frees, and the
- /// newest date of anything inside, since editing a file inside leaves the package's own date as it was. Nil for
- /// a package with something excluded inside, one that could not be read whole, or a walk that was stopped.
+ /// A document saved as a package, which iCloud keeps as one item: what removing its download frees, what it takes
+ /// on disk, and the newest date of anything inside, since editing a file inside leaves the package's own date as
+ /// it was. Nil for a package with something excluded inside, one that could not be read whole, or a walk that
+ /// was stopped.
static func package(
_ url: URL,
_ values: URLResourceValues,
exclusions: Exclusions,
countingFor scan: ScanCount? = nil,
unless isStopped: () -> Bool
- ) -> (size: Int64, modified: Date?)? {
+ ) -> (size: Int64, taken: Int64, modified: Date?)? {
guard !exclusions.holds(url), let contents = FileSize.walk(url, countingFor: scan, unless: isStopped),
!contents.couldNotBeRead
else { return nil }
- return (contents.size, [values.contentModificationDate, contents.newestChange].compactMap(\.self).max())
+ let modified = [values.contentModificationDate, contents.newestChange].compactMap(\.self).max()
+ return (contents.size, contents.taken, modified)
}
/// The readable name of the iCloud folder that holds `url`: "iCloud Drive" for `com~apple~CloudDocs`, and
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/CloudStorageTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/CloudStorageTests.swift
index 2744fdbe..e83a76c0 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/CloudStorageTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/CloudStorageTests.swift
@@ -144,6 +144,31 @@ struct CloudStorageTests {
#expect(sizes["clone.bin"] == nil, "a clone frees nothing")
}
+ /// A download that takes a row's worth of space but shares it with another copy frees nothing, so it is left
+ /// out of the list and counted, for the page to say why it is missing.
+ @Test func countsTheDownloadsLeftOutBecauseAnotherCopySharesTheirSpace() throws {
+ let directory = try TemporaryDirectory()
+ let drive = "Library/Mobile Documents/com~apple~CloudDocs"
+ try directory.file("\(drive)/plain.bin", bytes: 3_000_000)
+ let original = try directory.file("\(drive)/original.bin", bytes: 2_000_000)
+ let small = try directory.file("\(drive)/small.bin", bytes: 200_000)
+ let inPackage = try directory.file("\(drive)/Notes.rtfd/TXT.rtf", bytes: 2_000_000)
+ let drivePath = directory.url.appending(path: drive)
+ for (source, name) in [(original, "clone.bin"), (small, "small clone.bin"), (inPackage, "Notes.rtf")] {
+ let clone = drivePath.appending(path: name)
+ #expect(clonefile(source.path(percentEncoded: false), clone.path(percentEncoded: false), 0) == 0)
+ }
+
+ let collector = CloudStorage.Collector()
+ CloudStorage.collect(
+ home: directory.url, minimumSize: CloudStorage.minimumSize, exclusions: .none, into: collector,
+ deadline: .now + .seconds(20), countingFor: nil, isSafe: { _ in true }, unless: { false }
+ )
+
+ #expect(collector.collected.files.map(\.name) == ["plain.bin"])
+ #expect(collector.collected.sharedDownloads == 4, "only the clones that take a row's worth count")
+ }
+
@Test func leavesAFolderWithoutICloudAlone() async throws {
let directory = try TemporaryDirectory()
try directory.file("Library/Mobile Documents/com~apple~CloudDocs/plain.txt", bytes: 4_000_000)
diff --git a/Peel/Model/CloudLibrary.swift b/Peel/Model/CloudLibrary.swift
index 8607ff97..ffa27f7e 100644
--- a/Peel/Model/CloudLibrary.swift
+++ b/Peel/Model/CloudLibrary.swift
@@ -24,6 +24,8 @@ final class CloudLibrary {
/// `wasCutShort`: there is more than the list shows. `couldNotRead`: iCloud Drive couldn't be read at all.
private(set) var wasCutShort = false
private(set) var couldNotRead = false
+ /// The downloads left out because another copy on this Mac shares their space, so removing them frees nothing.
+ private(set) var sharedDownloads = 0
var selectedURLs: Set<URL> = [] {
didSet { updateSelectedSize() }
}
@@ -59,6 +61,7 @@ final class CloudLibrary {
files = scan.files
wasCutShort = scan.wasCutShort
couldNotRead = scan.couldNotRead
+ sharedDownloads = scan.sharedDownloads
selectedURLs.formIntersection(Set(scan.files.map(\.url)))
}
diff --git a/Peel/Views/Cloud/CloudView.swift b/Peel/Views/Cloud/CloudView.swift
index c8f94cd7..aa2ad166 100644
--- a/Peel/Views/Cloud/CloudView.swift
+++ b/Peel/Views/Cloud/CloudView.swift
@@ -73,10 +73,15 @@ struct CloudView: View {
)
}
} footer: {
- if cloud.wasCutShort {
- Text("There is more in iCloud Drive than Peel could look at in one go, so this list isn’t all of it.")
- .font(.callout)
- .foregroundStyle(.secondary)
+ if cloud.wasCutShort || cloud.sharedDownloads > 0 {
+ VStack(alignment: .leading, spacing: 6) {
+ if cloud.wasCutShort {
+ Text("There is more in iCloud Drive than Peel could look at in one go, so this list isn’t all of it.")
+ }
+ sharedDownloadsNote
+ }
+ .font(.callout)
+ .foregroundStyle(.secondary)
}
}
}
@@ -98,17 +103,23 @@ struct CloudView: View {
}
} else if cloud.files?.isEmpty == true, cloud.wasCutShort {
// The scan stopped early, so an empty list does not mean there is nothing to free.
- ContentUnavailableView(
- "Nothing Found So Far",
- systemImage: "icloud",
- description: Text("There is more in iCloud Drive than Peel could look at in one go, and nothing in the part it read is big enough to be worth freeing.")
- )
+ ContentUnavailableView {
+ Label("Nothing Found So Far", systemImage: "icloud")
+ } description: {
+ VStack(spacing: 8) {
+ Text("There is more in iCloud Drive than Peel could look at in one go, and nothing in the part it read is big enough to be worth freeing.")
+ sharedDownloadsNote
+ }
+ }
} else if cloud.files?.isEmpty == true {
- ContentUnavailableView(
- "Nothing to Free",
- systemImage: "checkmark.seal",
- description: Text("Peel found no file here that is safely in iCloud and big enough to be worth freeing.")
- )
+ ContentUnavailableView {
+ Label("Nothing to Free", systemImage: "checkmark.seal")
+ } description: {
+ VStack(spacing: 8) {
+ Text("Peel found no file here that is safely in iCloud and big enough to be worth freeing.")
+ sharedDownloadsNote
+ }
+ }
}
}
.edgeBar(.bottom) {
@@ -179,6 +190,12 @@ struct CloudView: View {
}
}
+ @ViewBuilder private var sharedDownloadsNote: some View {
+ if cloud.sharedDownloads > 0 {
+ Text("Peel doesn’t list ^[\(cloud.sharedDownloads) download](inflect: true) whose space on disk is shared with another copy on this Mac: removing a download like that frees nothing now.")
+ }
+ }
+
private func phase(listed: [CloudFile]) -> ScanPhase {
if cloud.files == nil { return cloud.scanRun.wasStopped ? .stopped : .scanning(.walk) }
if !searchText.isEmpty, cloud.files?.isEmpty == false, listed.isEmpty { return .message }