| type | skill |
| lifecycle | stable |
| inheritance | inheritable |
| name | cloud-storage-paths |
| description | Cross-platform cloud storage path resolution — OneDrive, iCloud, Dropbox path discovery and normalization |
| tier | standard |
| applyTo | **/*cloud*,**/*storage*,**/*paths* |
| currency | 2026-04-30T00:00:00.000Z |
| lastReviewed | 2026-04-30T00:00:00.000Z |
Cloud Storage Paths
Category: Cross-Platform
Time Saved: 1-2 hours debugging path resolution
Battle-tested: Yes — iCloud, OneDrive, Dropbox variants
The Problem
Your app needs to find the user's iCloud Drive (or OneDrive, Dropbox, Google Drive). You hardcode ~/iCloudDrive and it works on your machine. Users report "folder not found" errors.
Why It Happens
Cloud storage paths vary by:
- Provider — Each has different naming conventions
- OS — Same provider has different paths per OS
- Account type — Personal vs Business often differ
- Installation method — App Store vs direct download
- Version — Paths change between app versions
The Rule
Use a candidate-list approach. Check all known paths in priority order. Return first that exists.
Path Variants by Provider
iCloud Drive
| Platform | Possible Paths |
|---|
| macOS | ~/Library/Mobile Documents/com~apple~CloudDocs/ |
| Windows | %USERPROFILE%\iCloudDrive\ |
| Windows | %USERPROFILE%\iCloud Drive\ (space) |
| Windows | %USERPROFILE%\iCloud~com~apple~CloudDocs\ |
OneDrive
| Account Type | Windows Path |
|---|
| Personal | %USERPROFILE%\OneDrive\ |
| Business | %USERPROFILE%\OneDrive - CompanyName\ |
| Education | %USERPROFILE%\OneDrive - SchoolName\ |
macOS: ~/Library/CloudStorage/OneDrive-Personal/ or ~/Library/CloudStorage/OneDrive-CompanyName/
Dropbox
| Platform | Possible Paths |
|---|
| Windows | %USERPROFILE%\Dropbox\ |