Buckets:
| import os from "os" | |
| import path from "path" | |
| const home = os.homedir() | |
| const DARWIN_HOME = [ | |
| "Music", | |
| "Pictures", | |
| "Movies", | |
| "Downloads", | |
| "Desktop", | |
| "Documents", | |
| "Public", | |
| "Applications", | |
| "Library", | |
| ] | |
| const DARWIN_LIBRARY = [ | |
| "Application Support/AddressBook", | |
| "Calendars", | |
| "Mail", | |
| "Messages", | |
| "Safari", | |
| "Cookies", | |
| "Application Support/com.apple.TCC", | |
| "PersonalizationPortrait", | |
| "Metadata/CoreSpotlight", | |
| "Suggestions", | |
| ] | |
| const DARWIN_ROOT = ["/.DocumentRevisions-V100", "/.Spotlight-V100", "/.Trashes", "/.fseventsd"] | |
| const WIN32_HOME = ["AppData", "Downloads", "Desktop", "Documents", "Pictures", "Music", "Videos", "OneDrive"] | |
| /** Directory basenames to skip when scanning the home directory. */ | |
| export function names(): ReadonlySet<string> { | |
| if (process.platform === "darwin") return new Set(DARWIN_HOME) | |
| if (process.platform === "win32") return new Set(WIN32_HOME) | |
| return new Set() | |
| } | |
| /** Absolute paths that should never be watched, stated, or scanned. */ | |
| export function paths(): string[] { | |
| if (process.platform === "darwin") | |
| return [ | |
| ...DARWIN_HOME.map((name) => path.join(home, name)), | |
| ...DARWIN_LIBRARY.map((name) => path.join(home, "Library", name)), | |
| ...DARWIN_ROOT, | |
| ] | |
| if (process.platform === "win32") return WIN32_HOME.map((name) => path.join(home, name)) | |
| return [] | |
| } | |
| export * as Protected from "./protected" | |
Xet Storage Details
- Size:
- 1.4 kB
- Xet hash:
- e7066b6ca379068a7aae83d33ebb5c4e74df9b1c358d96d0917cf2f0d1f30909
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.